Closed
Description
Per discussion in #190, there are some issues introduced by the PR.
- Silent Drop of
NOT IN
:
- The current implementation silently drops
NOT IN
clauses (an always-true condition), which can corrupt query results. - For example: In an
OR
clause where all other conditions areFALSE
, droppingNOT IN
forces the query to returnFALSE
instead ofTRUE
. - Proposal: Replace
NOT IN
with an explicit always-true statement (e.g.,0 = 0
) instead of removing it.
- Inconsistency Between
NotIn
andNot(In)
:
c.NotIn("$a")
andc.Not(c.In("$a"))
produce divergent SQL outputs. This violates expectations of uniform behavior for logically equivalent operations.- Expected Behavior:
NOT IN
should be preserved as an always-true condition (likeIN
is preserved as1=0
for always-false).c.NotIn()
andc.Not(c.In())
should generate identical SQL.