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

Alias validation error #4968

Closed
czpmango opened this issue Dec 1, 2022 · 1 comment · Fixed by #4973
Closed

Alias validation error #4968

czpmango opened this issue Dec 1, 2022 · 1 comment · Fixed by #4973
Assignees
Labels
affects/master PR/issue: this bug affects master version. process/done Process of bug severity/blocker Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@czpmango
Copy link
Contributor

czpmango commented Dec 1, 2022

Please check the FAQ documentation before raising an issue

Your Environments (required)
nebula latest version
Describe the bug (required)
The variable curr is a node, but was incorrectly set to the path type.
How To Reproduce(required)

match p=allShortestPaths((v1)-[:like*1..3]-(v2)) where id(v1)=="Tim Duncan" and id(v2)=="Tony Parker" with nodes(p) as pathNodes WITH   [n IN pathNodes | id(n)] AS personIdsInPath,   [idx IN range(1, size(pathNodes)-1) | [prev IN [pathNodes[idx-1]] | [curr IN [pathNodes[idx]] | [prev, curr]]]] AS vertList UNWIND vertList AS c WITH c[0][0][0] AS prev, c[0][0][1] AS curr, personIdsInPath OPTIONAL MATCH (curr)<-[e:like]-(:player)-[:serve]->(:team)-[:teammate]->(prev) RETURN count(e) AS cnt1, prev, curr, personIdsInPath

Error: SemanticError: curr binding to different type: Node vs Path

Expected behavior
Verify variable types correctly.

Additional context
We'd be better off doing some refactoring of our existing implementation of alias management.

@czpmango czpmango added the type/bug Type: something is unexpected label Dec 1, 2022
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Dec 1, 2022
@Sophie-Xie Sophie-Xie added this to the v3.4.0 milestone Dec 1, 2022
@HarrisChu HarrisChu added affects/master PR/issue: this bug affects master version. severity/blocker Severity of bug labels Dec 1, 2022
@github-actions github-actions bot removed affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Dec 1, 2022
@github-actions github-actions bot added the process/fixed Process of bug label Dec 7, 2022
@HarrisChu
Copy link
Contributor

(root@nebula) [nba]> match p=allShortestPaths((v1)-[:like*1..3]-(v2)) where id(v1)=="Tim Duncan" and id(v2)=="Tony Parker" with nodes(p) as pathNodes WITH   [n IN pathNodes | id(n)] AS personIdsInPath,   [idx IN range(1, size(pathNodes)-1) | [prev IN [pathNodes[idx-1]] | [curr IN [pathNodes[idx]] | [prev, curr]]]] AS vertList UNWIND vertList AS c WITH c[0][0][0] AS prev, c[0][0][1] AS curr, personIdsInPath OPTIONAL MATCH (curr)<-[e:like]-(:player)-[:serve]->(:team)-[:teammate]->(prev) RETURN count(e) AS cnt1, prev, curr, personIdsInPath
+------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------+
| cnt1 | prev                                                                                                        | curr                                                  | personIdsInPath               |
+------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------+
| 0    | ("Tim Duncan" :player{age: 42, name: "Tim Duncan"} :bachelor{name: "Tim Duncan", speciality: "psychology"}) | ("Tony Parker" :player{age: 36, name: "Tony Parker"}) | ["Tim Duncan", "Tony Parker"] |
+------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------+
Got 1 rows (time spent 8153/22137 us)

@HarrisChu HarrisChu added the process/done Process of bug label Jan 9, 2023
@github-actions github-actions bot removed the process/fixed Process of bug label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/master PR/issue: this bug affects master version. process/done Process of bug severity/blocker Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants