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

[PROTOTYPE] Filter Conditions on Paths #20159

Draft
wants to merge 15 commits into
base: devel
Choose a base branch
from

Conversation

markuspf
Copy link
Contributor

Scope & Purpose

This is a prototype PR, not to be merged as is.

The goal of this work is to detect conditions that have to hold for all vertices/edges on paths, for instance as in the following query

FOR p IN 1..5 OUTBOUND K_PATHS "airports/LAX" TO "airports/SFO" flights
  FILTER p.vertices[* RETURN CURRENT.colour == "green"] ALL == true
  FILTER p.edges[* RETURN CURRENT.forbidden] ALL == false
  RETURN p

and optimize path search by abandoning all searches that would involve vertices/edges that don't satisfy this global condition.

This involves multiple things to happen:

  • The optimizer rule has to detect FILTER statements that access the path variable of a path enumeration using an expansion
  • The optimizer rule has to extract the expansion's map expression and rewrite it to apply to a single vertex
  • The optimizer rule has to enter the expression into the path enumeration
  • The path enumeration has to support adding global filters for vertices and edges
  • The path enumeration has to use these global filters.

At the moment all these steps happen in this one PR in various levels of completion.

@markuspf markuspf added this to the devel milestone Nov 20, 2023
@cla-bot cla-bot bot added the cla-signed label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant