Repository navigation
Conversation
…nd comma patterns ruvnet#484 made RETURN iterate every MATCH row (ruvnet#269), but the rest of the executor still reads bindings from the outer context, so: - MATCH with zero matches fell back to the outer context and RETURN n failed with VariableNotFound("n") instead of returning no rows. - RETURN n.name produced the column "?column?", and RETURN n.name, n.city collapsed both items into that one column. - MATCH ... SET and MATCH ... DETACH DELETE were no-ops, because SET and DELETE looked the variable up in the outer context, which MATCH no longer fills. - MATCH (p:Person), (c:Company) unioned the two pattern results instead of taking their cross product, so every row was missing a variable. SET, DELETE and RETURN now share one row_contexts() helper, the executor records whether a MATCH ran, property items get "var.prop" column names, and comma patterns combine as a cross product. Adds regression tests for each case alongside the ruvnet#269 ones. Co-Authored-By: RuFlo <ruv@ruv.net>
This was referenced Oct 20, 2026
This branch has not been deployed
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.
This is a fresh version of #292 on current main, and replaces it. #484 fixed #269, so RETURN now iterates every MATCH row. Thanks for that. This PR builds on it and fixes what was still missing.
I ran the tests from #292 against current main and 2 of them still fail. There are four remaining problems, each reproduced on current main with a new test before the fix:
RETURN nerror withVariableNotFound("n")instead of returning 0 rows. RETURN falls back to the outer context whenmatched_rowsis empty.RETURN n.namegets the column name?column?, andRETURN n.name, n.citycollapses both into one?column?column.MATCH ... SET n.x = ...andMATCH ... DETACH DELETE ndo nothing, because SET and DELETE read the variable from the outer context, which MATCH no longer fills.MATCH (p:Person), (c:Company)unions the two pattern results instead of taking a cross product, soRETURN p.name, c.nameerrors withVariableNotFound("p").The fix:
Executor, so there is no public API change.row_contexts()helper.var.propcolumn names. Aliases still win.Files:
crates/rvlite/src/cypher/executor.rsandcrates/rvlite/src/cypher/mod.rs.Tests: with only the new tests applied to current main, 7 of the 13 tests in
cypher::testsfail:test_match_no_results,test_match_return_properties,test_match_where_filter(it now checks then.namevalues),test_return_multiple_property_columns,test_match_set_updates_every_row,test_match_detach_delete_every_row,test_match_comma_patterns_cross_product. With this change:cargo test -p rvlite --no-fail-fast: lib 72 passed, 0 failed, 2 ignored (the parser ignores that were already there).cypher_integration_test8 passed.cargo fmtcheck is clean on the changed files.cargo clippy -p rvlite --all-targets: 0 warnings in rvlite, same as main.cargo check -p rvlite --target wasm32-unknown-unknownpasses.Not fixed here:
MATCH (n:A:B)still gives duplicates.This touches
crates/rvlite/src/cypher/mod.rs, like open PR #1084. I checked withgit merge-treeand there is no textual conflict.🤖 Generated with RuFlo