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

Add experimental draft support for GPML-style graph query parsing #148

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jpschorr
Copy link
Contributor

@jpschorr jpschorr commented Jul 6, 2022

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 use within the grammar is based on the assumption of a new graph data type being added to the specification of data types within PartiQL, and should be considered experimental until the semantics of the graph data type are specified.

Added by this PR:

  • basic and abbreviated node and edge patterns (section 4.1 of the GPML paper)
  • concatenated path patterns (section 4.2 of the GPML paper)
  • path variables (section 4.2 of the GPML paper)
  • graph patterns (i.e., comma separated path patterns) (section 4.3 of the GPML paper)
  • AST support for path quantifiers (section 4.4 of the GPML paper)
  • parenthesized patterns (section 4.4 of the GPML paper)
  • parsing support for path quantifiers (section 4.4 of the GPML paper)
  • restrictors and selector (section 5.1 of the GPML paper)
  • parsing support for pre-filters and post-filters (section 5.2 of the GPML paper)
  • AST support for pre-filters (section 5.2 of the GPML paper)

GPML features not yet implemented:

  • group variables (section 4.4 of the GPML paper)
  • path pattern union and multiset (section 4.5 of the GPML paper)
  • conditional variables (section 4.6 of the GPML paper)
  • graphical predicates (section 4.7 of the GPML paper)
  • aggregates of unbounded variables (section 5.3 of the GPML paper)

Similar functionality and test cases as introduced by:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jpschorr jpschorr requested a review from am357 July 6, 2022 04:33
@jpschorr jpschorr changed the title experimental GPML Add experimental draft support for GPML-style graph query Jul 6, 2022
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

Conformance comparison report

main (17cbcb5) 7803e5d +/-
% Passing 78.00% 78.00% 0.00%
✅ Passing 344 344 0
❌ Failing 0 0 0
🔶 Ignored 97 97 0
Total Tests 441 441 0

Number passing in both: 344

Number failing in both: 0

Number passing in main but now fail: 0

Number failing in main but now pass: 0

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Base: 87.32% // Head: 87.53% // Increases project coverage by +0.21% 🎉

Coverage data is based on head (b8180c5) compared to base (17cbcb5).
Patch coverage: 91.47% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #148      +/-   ##
==========================================
+ Coverage   87.32%   87.53%   +0.21%     
==========================================
  Files          23       23              
  Lines        2383     2512     +129     
==========================================
+ Hits         2081     2199     +118     
- Misses        302      313      +11     
Impacted Files Coverage Δ
partiql-parser/src/lexer.rs 97.09% <0.00%> (-0.19%) ⬇️
partiql-ast/src/ast.rs 50.89% <78.26%> (+3.64%) ⬆️
partiql-parser/src/parse/mod.rs 94.88% <100.00%> (+1.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jpschorr jpschorr requested a review from vgapeyev July 7, 2022 17:17
@jpschorr jpschorr marked this pull request as draft August 10, 2022 17:56
@jpschorr jpschorr force-pushed the spike-gpml branch 2 times, most recently from a25262c to 2039f20 Compare September 28, 2022 17:50
- Still doesn't allow edge as first part of a non-nested pattern
- Requires parens around entire MATCH expression
@jpschorr jpschorr changed the title Add experimental draft support for GPML-style graph query Add experimental draft support for GPML-style graph query parsing Mar 22, 2023
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.

1 participant