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

Support multiple index selection in start tag/edge type #3463

Open
wey-gu opened this issue Dec 14, 2021 · 0 comments
Open

Support multiple index selection in start tag/edge type #3463

wey-gu opened this issue Dec 14, 2021 · 0 comments
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Dec 14, 2021

I understand that it's not possible to scan different indexes involving (multiple steps walk) in an efficient way but logically in a slow way, it's still possible to be parsed and planned, right?

MATCH p=(v)-[e:follow|serve*2]->(v2) WHERE ALL(e_ in e WHERE e_.degree > 0) RETURN DISTINCT v2;
[ERROR (-1009)]: SemanticError: Can't solve the start vids from the sentence: MATCH p = (v)-[e:follow|serve*2]->(v2) WHERE all(__VAR_0 IN e WHERE ($__VAR_0.degree>0)) RETURN DISTINCT v2
MATCH p=(v:player:team)-[e:follow|serve*2]->(v2) WHERE ALL(e_ in e WHERE e_.degree > 0) RETURN DISTINCT v2;
[ERROR (-1009)]: SemanticError: Can't solve the start vids from the sentence: MATCH p = (v:player:team)-[e:follow|serve*2]->(v2) WHERE all(__VAR_0 IN e WHERE ($__VAR_0.degree>0)) RETURN DISTINCT v2

The workaround/mitigation I could think of now(the edge conditions are not the same as the above though):

(LOOKUP ON serve WHERE serve.start_year > 1000 UNION LOOKUP ON follow WHERE follow.degree > 20) \
| GO 2 steps FROM $-.SrcVID OVER serve, follow WHERE serve.start_year > 1000 or follow.degree > 20

context: https://discuss.nebula-graph.com.cn/t/topic/6872/18

@wey-gu wey-gu added the type/enhancement Type: make the code neat or more efficient label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

1 participant