-
Notifications
You must be signed in to change notification settings - Fork 9
Update Graph query support for SQL 2023 conformance #552
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
Conversation
Conformance comparison report
Number passing in both: 5709 Number failing in both: 822 Number passing in Base (38cc1e5) but now fail: 0 Number failing in Base (38cc1e5) but now pass: 34 The following test(s) were previously failing but now pass. Before merging, confirm they are intended to pass: Click here to see
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
==========================================
+ Coverage 81.93% 82.16% +0.23%
==========================================
Files 108 109 +1
Lines 22721 23143 +422
Branches 22721 23143 +422
==========================================
+ Hits 18616 19015 +399
- Misses 3567 3594 +27
+ Partials 538 534 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1013a7f
to
ddc7b4c
Compare
61455a8
to
cfd306a
Compare
cfd306a
to
d3cb98d
Compare
bf2de54
to
1b08958
Compare
f1b8f37
to
5d16ec0
Compare
5d16ec0
to
d4786df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work implementing all the parser + ast implementations of SQL2023 graphs queries. just one minor comment
expression: doc | ||
--- | ||
======================================================================================================================================================================================================== | ||
SELECT * FROM (g MATCH ( (x)-[e]->*(y) ) |+| (z) ~ (q) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps can call out somewhere that we choose to make the GRAPH_TABLE
keyword optional? SQL 2023's BNF definition makes it required
<table primary> ::=
!! All alternatives from ISO/IEC 9075-2
| <graph table derived table>
<graph table derived table> ::=
<graph table> [ <correlation or recognition> ]
<graph table> ::=
GRAPH_TABLE
<left paren> <graph reference> MATCH <graph pattern> <graph table shape>
<right paren>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a result of treating MATCH
'just' like any other expression. E.g., PartiQL
allows SELECT * FROM <anything that is a PartiQL expression here>
and (<expr> MATCH <graph-pattern>)
is defined as an expression.
Overview
This PR updates
The changes are made to conform to
GRAPH_TABLE
query as described in SQL 2023. This is largely similar to the direction that was described by the GPML paper (https://arxiv.org/abs/2112.06217), but with some addtional SQL-isms and some extensions.Evaluation of graph patterns are unchanged.
A large part of this PR are tests that assure roundtripping (text -> parse -> pretty-print -> parse) and pretty-print snapshot tests for the updated grammar.
SQL
If you are reviewing this PR, you may find the following useful:
This PR's changes pass all existing experimental graph tests (and improved conformance over the GPML-based grammar). Only test name changes were needed due to some test name generation collisions.
Cf. partiql/partiql-tests#133
This PR builds on previous PRs for implementing GPML-style graph query.
Cf. #546, #547, #548, #549, #551, #553
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.