chore(3vl): pushdown/3VL consistency test + doc follow-ups#76
Merged
Conversation
The interpreter's `eval_binop` yields `Value::Null` for a null-operand comparison; the pushdown `cmp_values` yields `false`. They produce identical rows because the value-predicate pushdown only lifts positive `attr op literal` AND-conjuncts, where a null operand means "drop" under both — and pushing a conjunct out of an OR / under a NOT is already forbidden (wrong for non-null rows too). `tests/pushdown_null_test.rs` pins this across the node-scan, LTJ `NodeAttrCmp`, and btree range-fold paths, so a future optimizer change that pushes a non-conjunct is caught. Also documents the invariant and the exact "unify into a shared cmp_3vl" trigger on `cmp_values`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds iso-gql-gaps.md §3.4 (the CLAUDE.md "Null semantics" note pointed here but the entry was missing): froGQL empties on type errors (FPPC model) where ISO wants a hard `22G12`/`22G03` data exception — essential-error hard-abort, material `NOT NULL` types, closed-graph property validation. Also notes that `IN`-as-membership is a froGQL extension (SQL-3VL-consistent; not in ISO/FPPC), in the doc and the eval_binop comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups after the 3VL merge (#73).
Pushdown/3VL consistency (the substantive bit)
The interpreter (
eval_binop) returnsValue::Nullfor a null-operand comparison; the pushdown (cmp_values) returnsfalse. These stay row-equivalent not by luck: the value-predicate pushdown only lifts positiveattr op literalAND-conjuncts, where a null operand means drop under both — and pushing a conjunct out of anOR/ under aNOTis already forbidden (wrong for non-null rows too). The keep-despite-null shapes (… OR true,NOT (…)) stay residual on the 3VL interpreter.tests/pushdown_null_test.rspins this across the node-scan, LTJNodeAttrCmp, and btree range-fold paths. It fails if the optimizer ever pushes a non-conjunct, or if the two comparison cores drift on keep/drop.cmp_valuesnow documents the invariant and the exact trigger to unify into a sharedcmp_3vlcore: if a pushed comparison's value is ever consumed as something other than keep/drop (e.g. a future computed-column pushdown feeding a projection/CASE).Docs
docs/internals/iso-gql-gaps.md §3.4— records the ISO data-exceptions workstream the CLAUDE.md "Null semantics" note already pointed at (essential-error hard-abort22G12, materialNOT NULL22G12/22G03, closed-graph property validation).IN-as-membership as a froGQL extension (SQL-3VL-consistent; not in ISO GQL nor FPPC) in the doc and theeval_binopcomment.No behavior change.
cargo fmt/clippy -Dclean; full sweep green.🤖 Generated with Claude Code