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

[GIE] Support Until condition in PathExpand #2514

Merged
merged 27 commits into from
Mar 29, 2023

Conversation

BingqingLyu
Copy link
Collaborator

@BingqingLyu BingqingLyu commented Mar 14, 2023

What do these changes do?

Support UNTIL condition in PathExpand. e.g., you can query like:

1) g.V().hasLabel('person').has('name', 'marko').out("0..10").with('UNTIL', '@.name=='josh''),
which means to find the path starting from 'marko', and ends if the target vertex is 'josh', or the path's length exceeds 10.

2) g.V().hasLabel('person').has('name', 'marko').out("5..10").with('UNTIL', '@.name=='josh''),
which means to find the path starting from 'marko', the path's length must be no less than 5, and ends either the target vertex is 'josh', or the path's length exceeds 10.

3) g.V().hasLabel('person').has('name', 'marko').out("1..10").with('UNTIL', '@.name=='marko'') ,
which means to find the path starting from 'marko', and ends if the target vertex is 'marko' (i.e., a cycle detection), or the path's length exceeds 10. NOTICE that in this case, DO NOT give the lower bound as 0. If 0 is given, the path will stop immediately at the starting 'marko' vertex since it already meets the until condition.

Related issue number

Fixes #2516

@BingqingLyu BingqingLyu force-pushed the ir_path_expand_condition branch 4 times, most recently from ffad253 to 573b44b Compare March 14, 2023 07:03
@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2023

Codecov Report

Merging #2514 (f4bf47e) into main (0b4f1e7) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2514   +/-   ##
=======================================
  Coverage   39.90%   39.90%           
=======================================
  Files          88       88           
  Lines        9838     9838           
=======================================
  Hits         3926     3926           
  Misses       5912     5912           

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 ce82413...f4bf47e. Read the comment docs.

@BingqingLyu BingqingLyu marked this pull request as draft March 20, 2023 03:31
@BingqingLyu BingqingLyu marked this pull request as ready for review March 22, 2023 07:29
@BingqingLyu BingqingLyu merged commit 694d080 into alibaba:main Mar 29, 2023
@BingqingLyu BingqingLyu deleted the ir_path_expand_condition branch March 29, 2023 09:34
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.

Support Until condition in PathExpand
4 participants