Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interactive): Support [] Operator in Cypher Queries #3168

Merged
merged 12 commits into from
Sep 4, 2023

Conversation

shirly121
Copy link
Collaborator

@shirly121 shirly121 commented Sep 1, 2023

What do these changes do?

  1. support variable list operator which is denoted by [a.name, a.age] in cypher queries
  2. introduce a new type for GraphPath to differentiate it from other ArrayTypes, as the length() function can only be applied to GraphPath types

Related issue number

Fixes

@shirly121 shirly121 changed the title feat(interactive): Support Variable List in Cypher Queries feat(interactive): Support Variable_List Operator in Cypher Queries Sep 1, 2023
@shirly121 shirly121 changed the title feat(interactive): Support Variable_List Operator in Cypher Queries feat(interactive): Support [] Operator in Cypher Queries Sep 1, 2023
longbinlai
longbinlai previously approved these changes Sep 1, 2023
@Test
public void with_11_test() {
RelNode project =
Utils.eval("Match (a:person)-[]-(b:person) Return [a.name, b.age, 1]").build();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about returning an empty array like [ ]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about returning an empty array like [ ]

We have the same behavior as official Neo4j, both of which output an empty list.

@neo4j> Match (a) Return [];
+-----+
| $f0 |
+-----+
| []  |
| []  |
| []  |
| []  |
| []  |
| []  |
+-----+

@longbinlai longbinlai self-requested a review September 2, 2023 03:16
@codecov-commenter
Copy link

Codecov Report

Merging #3168 (7bb3605) into main (246f85b) will decrease coverage by 30.96%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3168       +/-   ##
===========================================
- Coverage   73.25%   42.29%   -30.96%     
===========================================
  Files         102      101        -1     
  Lines       11006    10907       -99     
===========================================
- Hits         8062     4613     -3449     
- Misses       2944     6294     +3350     

see 62 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9dcbe6...7bb3605. Read the comment docs.

@longbinlai longbinlai merged commit 8449e43 into alibaba:main Sep 4, 2023
47 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.

None yet

4 participants