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

VarLenExtend pattern matching front end #540

Closed
acquamarin opened this issue Apr 1, 2022 · 4 comments
Closed

VarLenExtend pattern matching front end #540

acquamarin opened this issue Apr 1, 2022 · 4 comments
Assignees

Comments

@acquamarin
Copy link
Collaborator

We should allow the user to omit the lower bound/ upper bound of the variable length extend query.
If the user omit the lower bound of the query:
eg. (a)-[*..5]->(b), the front end should put 1 as the lower bound.
If the user omit the upper bound of the query:
eg. (a)-[*3..]->(b), the front end should put MAX_VAR_LENGTH_EXTEND_PATH as the upper bound.

Neo4j documentation for varLenExtend pattern:
https://neo4j.com/docs/cypher-manual/current/syntax/patterns/

@acquamarin acquamarin self-assigned this Apr 1, 2022
@andyfengHKU
Copy link
Contributor

I think we should just ask user to always give us lowerBound and upperBound.

If lowerBound is omitted, it's unclear whether our default is 0 or 1.
If upperBound is omitted, it usually means Kleene star which we cannot support with walk semantic.

So I think we won't solve this issue for a very very long time. Let me know if we should just close it.

@jkanche
Copy link

jkanche commented Sep 11, 2023

I would love to omit the upper bound on the queries to traverse the subgraph and collect all descendants with a specific relationship.

If the user omit the upper bound of the query:
eg. (a)-[*3..]->(b), the front end should put MAX_VAR_LENGTH_EXTEND_PATH as the upper bound.

@andyfengHKU
Copy link
Contributor

I would love to omit the upper bound on the queries to traverse the subgraph and collect all descendants with a specific relationship.

If the user omit the upper bound of the query:
eg. (a)-[*3..]->(b), the front end should put MAX_VAR_LENGTH_EXTEND_PATH as the upper bound.

In such case we need a different semantic where either no node or no edge can be repeatedly visited on the path. Otherwise the computation will not be able to stop if a cyclic pattern is found. We are looking into this but it will take a bit of time for it to be available in the release.

@andyfengHKU
Copy link
Contributor

Solved in PR #2041

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

No branches or pull requests

3 participants