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

OpenCypher regression test - MATCH clause #2310

Merged
merged 8 commits into from
Nov 27, 2023
Merged

OpenCypher regression test - MATCH clause #2310

merged 8 commits into from
Nov 27, 2023

Conversation

russell-liu
Copy link
Contributor

-STATEMENT MATCH (a)-[r]->(b)
WHERE NOT LABEL(a) = 'A'
DELETE r
CREATE (b)-[:LIKES]->(a);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the rel table group label LIKES doesn't work, but I don't know what to change it to.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can use LIKES_X_Y instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But X and Y each has multiple possibilities, as the labels of b and a are not fixed, so using any particular possible LIKES_X_Y doesn't work.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6175606) 91.52% compared to head (d41cf00) 91.54%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2310      +/-   ##
==========================================
+ Coverage   91.52%   91.54%   +0.02%     
==========================================
  Files        1024     1026       +2     
  Lines       37844    37904      +60     
==========================================
+ Hits        34637    34700      +63     
+ Misses       3207     3204       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andyfengHKU andyfengHKU left a comment

Choose a reason for hiding this comment

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

LGTM

CREATE NODE TABLE D(ID SERIAL, name STRING, PRIMARY KEY(ID));
CREATE NODE TABLE E(ID SERIAL, name STRING, PRIMARY KEY(ID));
CREATE REL TABLE GROUP LIKES(FROM A TO B, FROM B TO C, FROM C TO D, FROM D TO E, FROM B TO A);
CREATE (n0:A {name: 'n0'}), (n00:B {name: 'n00'}), (n01:B {name: 'n01'}), (n000:C {name: 'n000'}), (n001:C {name: 'n001'}), (n010:C {name: 'n010'}), (n011:C {name: 'n011'}), (n0000:D {name: 'n0000'}), (n0001:D {name: 'n0001'}), (n0010:D {name: 'n0010'}), (n0011:D {name: 'n0011'}), (n0100:D {name: 'n0100'}), (n0101:D {name: 'n0101'}), (n0110:D {name: 'n0110'}), (n0111:D {name: 'n0111'}) CREATE (n0)-[:LIKES_A_B]->(n00), (n0)-[:LIKES_A_B]->(n01), (n00)-[:LIKES_B_C]->(n000), (n00)-[:LIKES_B_C]->(n001), (n01)-[:LIKES_B_C]->(n010), (n01)-[:LIKES_B_C]->(n011), (n000)-[:LIKES_C_D]->(n0000), (n000)-[:LIKES_C_D]->(n0001), (n001)-[:LIKES_C_D]->(n0010), (n001)-[:LIKES_C_D]->(n0011), (n010)-[:LIKES_C_D]->(n0100), (n010)-[:LIKES_C_D]->(n0101), (n011)-[:LIKES_C_D]->(n0110), (n011)-[:LIKES_C_D]->(n0111);
Copy link
Contributor

Choose a reason for hiding this comment

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

new line at the end of file

-STATEMENT MATCH (a)-[r]->(b)
WHERE NOT LABEL(a) = 'A'
DELETE r
CREATE (b)-[:LIKES]->(a);
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use LIKES_X_Y instead

@russell-liu russell-liu marked this pull request as ready for review November 27, 2023 15:27
@russell-liu russell-liu merged commit bb97dc3 into master Nov 27, 2023
12 checks passed
@russell-liu russell-liu deleted the tck branch November 27, 2023 15:27
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.

3 participants