Skip to content

fix(gfql): ne()/<> and IN on NULL follow openCypher/SQL 3-valued logic (L0 generic) - #1666

Merged
lmeyerov merged 2 commits into
masterfrom
dev/gfql-3vl-generic
Jul 3, 2026
Merged

lmeyerov merged 2 commits into
masterfrom
dev/gfql-3vl-generic

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

L0 of the GFQL engine stack: the generic 3-valued-logic null fix (benefits pandas + cuDF; polars already conformant). ne()/<> and membership/IN over a NULL cell now exclude the row per openCypher/SQL 3VL, fixed in the NE predicate + filter_by_dict. Peeled below the polars engine so all engines inherit it. Part of #1664 (openCypher conformance).

Note for the merger: the user-facing CHANGELOG entries for this fix ride the stacked followups PR #1667 (they were written there before this fix was peeled down to L0). Merging this PR alone ships the behavior change without its CHANGELOG line — fine if #1667 follows shortly; otherwise cherry-pick the two 3VL entries from #1667's CHANGELOG.

…c (generic L0)

A NULL cell used to be KEPT by n({col: ne(x)}) / WHERE col <> x (pandas NaN != x
-> True) and by membership n({col: [.., None]}) / IN on cuDF (isin matching a
null against a None list element). Per openCypher/SQL 3VL, null <> x and
null IN [...] are null -> not a match -> excluded, like eq/gt/lt.

Fixed generically: NE predicate masks nulls (& notna); filter_by_dict membership
masks nulls. Engine-uniform pandas + cuDF (polars engine already conformant).
+TestThreeValuedLogicNull (generic). L0 of the layered stack (benefits all
engines); broader openCypher null-semantics + per-engine docs in #1664/#1665.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@lmeyerov
lmeyerov merged commit c6e8e47 into master Jul 3, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant