Support Simple Unwind in lance-graph#112
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
beinan
approved these changes
Jan 28, 2026
beinan
left a comment
Collaborator
There was a problem hiding this comment.
lgtm, @ChunxuTang do you want also take a look? thanks!
ChunxuTang
approved these changes
Jan 29, 2026
ChunxuTang
left a comment
Collaborator
There was a problem hiding this comment.
@leiyuou
Generally looks good to me! Just left a minor comment.
Comment on lines
+4514
to
+4533
| // Parser Tests | ||
|
|
||
| #[test] | ||
| fn test_parse_unwind_simple() { | ||
| use lance_graph::parser::parse_cypher_query; | ||
| let query = "UNWIND [1, 2, 3] AS num RETURN num"; | ||
| let ast = parse_cypher_query(query); | ||
| assert!(ast.is_ok(), "Failed to parse simple UNWIND query"); | ||
| } | ||
|
|
||
| #[test] | ||
| fn test_parse_unwind_after_match() { | ||
| use lance_graph::parser::parse_cypher_query; | ||
| let query = "MATCH (n) UNWIND n.list AS item RETURN item"; | ||
| let ast = parse_cypher_query(query); | ||
| assert!(ast.is_ok(), "Failed to parse UNWIND after MATCH"); | ||
| } | ||
|
|
||
| // Execution Tests | ||
|
|
Collaborator
There was a problem hiding this comment.
Since the test_datafusion_pipeline.rs mainly contains integration tests, I suggest removing the parser tests from here.
Collaborator
There was a problem hiding this comment.
If you want to test parsing the UNWIND statements, better to run the tests in the parser.rs file.
Contributor
Author
There was a problem hiding this comment.
Thanks for pointing it out. Update the PR
ChunxuTang
approved these changes
Jan 29, 2026
Collaborator
|
Fix #75 |
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.
Support
UNWIND [1, 2, 3] AS num RETURN num
MATCH (n) UNWIND n.list AS item RETURN item
MATCH (p:Person) UNWIND [10, 20] AS x RETURN p.name, x
UNWIND [1, 2] AS target_id MATCH (p:Person) WHERE p.id = target_id RETURN p.name
Key changes: