[Sqlalchemy-tickets] Issue #4320: Negation with .self_group() (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: Alana P. <iss...@bi...> - 2018-08-15 19:08:01
|
New issue 4320: Negation with .self_group() https://bitbucket.org/zzzeek/sqlalchemy/issues/4320/negation-with-self_group Alana Pradhan: I think this bug is an extension of https://bitbucket.org/zzzeek/sqlalchemy/issues/3969/negation-of-labeled-element I hit this bug in 1.2.10 when I add `.self_group()` to the or_ expression: ``` #!python from sqlalchemy import * from sqlalchemy.dialects import sqlite expr = or_(column('x') == 1, column('y') == 2).self_group() bug = not_(expr.label('foo')) print(bug.compile()) print(bug.compile(dialect=sqlite.dialect())) ``` ``` NOT (x = :x_1 OR y = :y_1) (x = ? OR y = ?) = 0 ``` |