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

with * clause following a unwind clause report "Alias used but not defined error" #5015

Closed
nebula-bots opened this issue Dec 7, 2022 · 0 comments · Fixed by #5016
Closed
Assignees
Labels
affects/master PR/issue: this bug affects master version. auto-sync find/automation process/done Process of bug severity/major Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@nebula-bots
Copy link
Contributor

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Your Environments (required)

Look at the queries below from Nebula:

(root@nebula) [gdlancer]> match p = (v0)-[e0]->(v1) where id(v0) in [1, 2, 3, 4, 5, 6, 7, 8] unwind v0 as uv0  with * return e0 limit 5;
[ERROR (-1009)]: SemanticError: Alias used but not defined: `e0'

Mon, 28 Nov 2022 14:12:37 CST

(root@nebula) [gdlancer]> match p = (v0)-[e0]->(v1) where id(v0) in [1, 2, 3, 4, 5, 6, 7, 8]  with * return e0 limit 5;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| e0                                                                                                                                                                                         |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [:Rel_5 3->6 @0 {Rel_5_0_Bool: true, Rel_5_1_Bool: true, Rel_5_2_Double: 0.35838, Rel_5_3_String: "Chris Paul", Rel_5_4_Double: 0.441373}]                                                 |
| [:Rel_2 3->6 @0 {Rel_2_0_Int: 36, Rel_2_1_Double: 0.415751, Rel_2_2_String: "Dejounte Murray", Rel_2_3_Bool: true, Rel_2_4_Bool: true, Rel_2_5_Int: 74, Rel_2_6_String: "Kevin Durant"}]   |
| [:Rel_1 8->24 @0 {Rel_1_0_Int: 76, Rel_1_1_Int: 84, Rel_1_2_Int: 82, Rel_1_3_Double: 0.170762, Rel_1_4_Bool: true, Rel_1_5_Int: 33}]                                                       |
| [:Rel_4 8->24 @0 {Rel_4_0_Bool: false, Rel_4_1_String: "Cory Joseph", Rel_4_2_Double: 0.439029, Rel_4_3_String: "Aron Baynes", Rel_4_4_Double: 0.211945, Rel_4_5_String: "Blake Griffin"}] |
| [:Rel_1 5->24 @0 {Rel_1_0_Int: 4, Rel_1_1_Int: 58, Rel_1_2_Int: 84, Rel_1_3_Double: 0.985954, Rel_1_4_Bool: false, Rel_1_5_Int: 71}]                                                       |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Got 5 rows (time spent 2525/2894 us)

Mon, 28 Nov 2022 14:12:41 CST

(root@nebula) [gdlancer]>

The first query report error "SemanticError: Alias used but not defined: e0", but if we remove the unwind clause before with clause, everything is ok. In contrast, both of these two queries work well in Neo4j:

$ match p = (v0)-[e0]->(v1) where v0.id in [1, 2, 3, 4, 5, 6, 7, 8] unwind v0 as uv0  with * return e0 limit 5;

╒══════════════════════════════════════════════════════════════════════╕
│"e0"                                                                  │
╞══════════════════════════════════════════════════════════════════════╡
│{"Rel_3_1_String":"LeBron James","Rel_3_0_String":"Aron Baynes","Rel_3│
│_2_Double":0.831096,"Rel_3_3_Int":11}                                 │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_2_0_Int":38,"Rel_2_5_Int":6,"Rel_2_3_Bool":false,"Rel_2_4_Bool":│
│true,"Rel_2_1_Double":0.120953,"Rel_2_6_String":"Tracy McGrady","Rel_2│
│_2_String":"Null1"}                                                   │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_1_1_Int":5,"Rel_1_3_Double":0.975062,"Rel_1_0_Int":3,"Rel_1_4_Bo│
│ol":true,"Rel_1_2_Int":81,"Rel_1_5_Int":59}                           │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_0_4_Double":0.468568,"Rel_0_0_Bool":true,"Rel_0_3_Int":96,"Rel_0│
│_6_Int":77,"Rel_0_5_Int":98,"Rel_0_2_String":"Joel Embiid","Rel_0_1_St│
│ring":"Kevin Durant"}                                                 │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_4_1_String":"Kevin Durant","Rel_4_4_Double":0.285247,"Rel_4_0_Bo│
│ol":true,"Rel_4_5_String":"Cory Joseph","Rel_4_3_String":"Marc Gasol",│
│"Rel_4_2_Double":0.71757}                                             │
└──────────────────────────────────────────────────────────────────────┘

$  match p = (v0)-[e0]->(v1) where v0.id in [1, 2, 3, 4, 5, 6, 7, 8]  with * return e0 limit 5;

╒══════════════════════════════════════════════════════════════════════╕
│"e0"                                                                  │
╞══════════════════════════════════════════════════════════════════════╡
│{"Rel_3_1_String":"LeBron James","Rel_3_0_String":"Aron Baynes","Rel_3│
│_2_Double":0.831096,"Rel_3_3_Int":11}                                 │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_2_0_Int":38,"Rel_2_5_Int":6,"Rel_2_3_Bool":false,"Rel_2_4_Bool":│
│true,"Rel_2_1_Double":0.120953,"Rel_2_6_String":"Tracy McGrady","Rel_2│
│_2_String":"Null1"}                                                   │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_1_1_Int":5,"Rel_1_3_Double":0.975062,"Rel_1_0_Int":3,"Rel_1_4_Bo│
│ol":true,"Rel_1_2_Int":81,"Rel_1_5_Int":59}                           │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_0_4_Double":0.468568,"Rel_0_0_Bool":true,"Rel_0_3_Int":96,"Rel_0│
│_6_Int":77,"Rel_0_5_Int":98,"Rel_0_2_String":"Joel Embiid","Rel_0_1_St│
│ring":"Kevin Durant"}                                                 │
├──────────────────────────────────────────────────────────────────────┤
│{"Rel_4_1_String":"Kevin Durant","Rel_4_4_Double":0.285247,"Rel_4_0_Bo│
│ol":true,"Rel_4_5_String":"Cory Joseph","Rel_4_3_String":"Marc Gasol",│
│"Rel_4_2_Double":0.71757}                                             │
└──────────────────────────────────────────────────────────────────────┘

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@nebula-bots nebula-bots added affects/master PR/issue: this bug affects master version. auto-sync find/automation severity/major Severity of bug type/bug Type: something is unexpected labels Dec 7, 2022
@xtcyclist xtcyclist self-assigned this Dec 7, 2022
@Sophie-Xie Sophie-Xie added this to the v3.4.0 milestone Dec 7, 2022
@github-actions github-actions bot added the process/fixed Process of bug label Dec 7, 2022
@Hester-Gu Hester-Gu added the process/done Process of bug label Jan 13, 2023
@github-actions github-actions bot removed the process/fixed Process of bug label Jan 13, 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. auto-sync find/automation process/done Process of bug severity/major Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants