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 undirected query #1522

Closed
4 tasks done
andyfengHKU opened this issue May 8, 2023 · 0 comments
Closed
4 tasks done

Add undirected query #1522

andyfengHKU opened this issue May 8, 2023 · 0 comments
Assignees
Labels
feature New features or missing components of existing features

Comments

@andyfengHKU
Copy link
Contributor

andyfengHKU commented May 8, 2023

Goal

The goal of this issue is to support undirected query in a similar fashion as Neo4j.

Neo4j supports 3 types of relationship

  • Left-to-right, e.g.(a)-[e]->(b)
  • Right-to-left, e.g. (a)<-[e]-(b)
  • Undirected, e.g. (a)-[e]-(b)

Currently we support left-to-right and right-to-left in the system and missing the undirected one.

Design Details

The semantic of undirected is simply the union of left-to-right and right-to-left and should be implemented by solely changing the extend operator.

In query compilation, we should change query edge to be able to take UNDIRECTED as a direction and propagate this change to logic extend.

In query processing, recall that we have implemented a GenericScanRelTable which takes one adjList from each rel table and scan them one by one. Undirected extend should further modify GenericScanRelTable such that it takes both fwd and bwd adjList from each rel table. From a high level view, GenericScanRelTable still scans multiple adjList. Undirected extend simply adds more adjList to scan.

TODOs

  • Add undirected query edge and propagate this change to logical extend. Changes include but not limit to parser, binder, logical extend and cardinality estimator.
  • Modify GenericScanRelTable to take fwd and bwd adjList from a single rel table. (Example test query (a:Person)-[:knows]->(b:Person))
  • Modify GenericScanRelTable to take fwd and bwd adjColumn from a single rel table. (Example test query (a:Person)-[:meets]->(b:Person))
  • Modify GenericScanRelTable to take fwd and bwd adjList/Column from multiple rel tables. (Example test query (a:Person)-[:meets|:knows]->(b:Person))
@aziz-mu aziz-mu self-assigned this May 8, 2023
@andyfengHKU andyfengHKU added the feature New features or missing components of existing features label May 8, 2023
@aziz-mu aziz-mu closed this as completed May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features or missing components of existing features
Projects
None yet
Development

No branches or pull requests

2 participants