-
Notifications
You must be signed in to change notification settings - Fork 9
Add support for GPML-style graph query parsing #548
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
+ Coverage 81.78% 81.91% +0.13%
==========================================
Files 106 106
Lines 22037 22386 +349
Branches 22037 22386 +349
==========================================
+ Hits 18022 18337 +315
- Misses 3504 3536 +32
- Partials 511 513 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Conformance comparison report
Number passing in both: 5603 Number failing in both: 826 Number passing in Base (24ab5bd) but now fail: 0 Number failing in Base (24ab5bd) but now pass: 0 |
f1142df
to
c9f0e33
Compare
c9f0e33
to
b9340a7
Compare
pub fn is_var_non_reserved(&self) -> bool { | ||
matches!( | ||
self, | ||
Token::Acyclic | Token::Any | Token::Simple | Token::Shortest | Token::Trail | ||
) | ||
} | ||
pub fn is_fn_non_reserved(&self) -> bool { | ||
matches!( | ||
self, | ||
Token::Acyclic | Token::Any | Token::Simple | Token::Shortest | Token::Trail | ||
) | ||
} |
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.
Will some more tokens be added as non-reserved in the future?
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.
That is, generally, the nature of non-reserved tokens. If you add a new token to the grammar (generally in a subset that didn't exist before), that was previously able to be used as, e.g., a name, then this is a way to handle it.
AnyK(NonZeroU32), | ||
ShortestK(NonZeroU32), | ||
ShortestKGroup(NonZeroU32), |
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.
does the GPML paper require the k
be non-zero? perhaps it's non-sensical to have a k
of 0?
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.
The shortest 0 paths are the empty set.
This adds addtional features to the draft parser/AST support for a subset of GPML as outlined by Graph Pattern Matching in GQL and SQL/PGQ.
The targeted language definition is what was proposed in RFC-0025 and RFC-0033.
Added by this PR:
GPML features not yet implemented:
Reviving #148
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.