feat(rel): node equality + unlabelled-endpoint property join (#598) — passing 18→25#901
Merged
Merged
Conversation
Two read-path WHERE-join fixes that fully un-skip the equi-join features: - Node equality: `WHERE a = b` / `a <> b` over node variables compares their `node_uuid`. Each operand otherwise lowered to a bare `var_<v>` qualifier (a multi-column node, no scalar form) and errored. Handled in `lower_binary` via `node_uuid_of` (a node var has a NodeScan shape). - Unlabelled bound endpoint property join: an already-bound but unlabelled node — the dst of `(n)-[r]->(x)` — now joins its properties (`join_node_properties` → `_untyped` in exploratory, #889), so a later `WHERE x.p = …` / `RETURN x.p` resolves. The bound-var NodeScan path previously returned early for `ty == None`. Un-skips: MatchWhere3 (all 3) and WithWhere3 (all 3) feature-level; MatchWhere4 [1] (per-scenario, [2] = pattern predicate still tagged). Corpus scenarios_passing 18 → 25 (mostly node-returning, exercising the render arms). Validated: new e2e `node_equality_compares_identity`, `unlabelled_bound_dst_property_resolves`; BDD 25/25; tck_coverage green; gf-rel goldens unchanged; clippy --workspace -D warnings + fmt clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
WalkthroughTwo correctness fixes in the relational lowering layer: ChangesNode identity comparison and unlabelled node property resolution
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Advances #598. Two read-path WHERE-join fixes that fully un-skip the equi-join features.
Fixes
WHERE a = b/a <> bover node variables compares theirnode_uuid. Each operand otherwise lowered to a barevar_<v>qualifier (a multi-column node, no scalar form) → error. Handled inlower_binaryvianode_uuid_of(a node var is one with aNodeScanshape).xin(n)-[r]->(x)) now joins its properties (_untypedin exploratory, feat(rel): complete node-value materialization — unlabelled RETURN n, render, rel/path values #889), so a laterWHERE x.p = …/RETURN x.presolves. The bound-varNodeScanpath previously returned early forty == None.Un-skips (mostly node-returning → exercise render)
MatchWhere3(all 3) andWithWhere3(all 3) — feature-level.MatchWhere4 [1]— per-scenario ([2] = WHERE pattern-predicate, still tagged).Validation
node_equality_compares_identity,unlabelled_bound_dst_property_resolves; BDD 25/25;tck_coveragegreen; gf-rel goldens unchanged;cargo clippy --workspace -- -D warnings+ fmt clean.🤖 Generated with Claude Code
Note
Add node equality comparison by identity and unlabelled-endpoint property join
=,<>) on node variables now comparesnode_uuidcolumns instead of failing on bare multi-column qualifiers, enablingWHERE a = bandWHERE a <> bto work correctly in expr.rs.xin(n)-[:KNOWS]->(x)) now have their properties joined into the stream viajoin_node_properties, allowingx.propinWHERE/RETURNto resolve in lowerer.rs.MatchWhere3,WithWhere3, andBoolean1move from skipped to passing.Macroscope summarized eb67b41.
Summary by CodeRabbit
Bug Fixes
Tests