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

Match query return unexplainable results(should report semantic error instead) #4921

Closed
codesigner opened this issue Nov 23, 2022 · 0 comments · Fixed by #4923
Closed

Match query return unexplainable results(should report semantic error instead) #4921

codesigner opened this issue Nov 23, 2022 · 0 comments · Fixed by #4923
Assignees
Labels
type/bug Type: something is unexpected

Comments

@codesigner
Copy link
Contributor

Please check the FAQ documentation before raising an issue

Describe the bug (required)

The query in Neo4j report error:

@neo4j>  match (v)-[e*1..2]->() where v.id = 1 match p = (vv)-->()-[e]->() return p;
Type mismatch: e defined with conflicting type List<Relationship> (expected Relationship) (line 1, column 60 (offset: 59))
"match (v)-[e*1..2]->() where v.id = 1 match p = (vv)-->()-[e]->() return p"

e is a list of edges, the query engine will not be able to interpret the semantic of this query match p = (vv)-->()-[e]->() return p;, but Nebula executes this query and return list of unexplainable results:

(root@nebula) [testdb]>  match (v)-[e*1..2]->() where id(v) == 1 match p = (vv)-->()-[e]->() where id(vv) == 2 return count(p)
+----------+
| count(p) |
+----------+
| 60       |
+----------+
Got 1 rows (time spent 3.091ms/253.562958ms)

Thu, 10 Nov 2022 16:48:22 CST

(root@nebula) [testdb]>  match (v)-[e*1..2]->() where id(v) == 1 match p = (vv)-->()-[e]->() where id(vv) == 2 return p limit 1;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| p                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| <(2 :Label_0{labelProp_0_0: 0.5245000123977661, labelProp_0_1: "Jonathon Simmons", labelProp_0_2: true, labelProp_0_3: "Blake Griffin"} :Label_1{labelProp_1_0: 0.012826000340282917, labelProp_1_1: true, labelProp_1_2: 100, labelProp_1_3: 159, labelProp_1_4: false, labelProp_1_5: 0.34768199920654297})-[:EDGE_0@0 {edgeProp_0_0: true, edgeProp_0_1: true, edgeProp_0_2: 0.22974899411201477, edgeProp_0_3: "Marco Belinelli", edgeProp_0_4: 0.3134469985961914, edgeProp_0_5: 133, edgeProp_0_6: 126}]->(11 :Label_5{labelProp_5_0: "Rajon Rondo", labelProp_5_1: 0.040720000863075256, labelProp_5_2: false, labelProp_5_3: "Damian Lillard", labelProp_5_4: "Ricky Rubio", labelProp_5_5: 0.9604970216751099} :Label_3{labelProp_3_0: 0.7512410283088684, labelProp_3_1: "Paul Gasol", labelProp_3_2: 0.8409929871559143, labelProp_3_3: true, labelProp_3_4: false, labelProp_3_5: 0.9499369859695435, labelProp_3_6: true} :Label_2{labelProp_2_0: "JaVale McGee", labelProp_2_1: 84, labelProp_2_2: "Ricky Rubio", labelProp_2_3: true, labelProp_2_4: 162, labelProp_2_5: true} :Label_4{labelProp_4_0: 0.9626240134239197, labelProp_4_1: "Aron Baynes", labelProp_4_2: 106, labelProp_4_3: "DeAndre Jordan", labelProp_4_4: 0.4075320065021515, labelProp_4_5: false} :Label_0{labelProp_0_0: 0.926410973072052, labelProp_0_1: "Kobe Bryant", labelProp_0_2: true, labelProp_0_3: "Dwyane Wade"})-[:EDGE_2@0 {edgeProp_2_0: true, edgeProp_2_1: false, edgeProp_2_2: 176, edgeProp_2_3: "Null4", edgeProp_2_4: true, edgeProp_2_5: 0.615077018737793, edgeProp_2_6: 183}]->(27 :Label_3{labelProp_3_0: 0.1856060028076172, labelProp_3_1: "Damian Lillard", labelProp_3_2: 0.29776498675346375, labelProp_3_3: false, labelProp_3_4: false, labelProp_3_5: 0.5804709792137146, labelProp_3_6: true} :Label_2{labelProp_2_0: "Null1", labelProp_2_1: 164, labelProp_2_2: "DeAndre Jordan", labelProp_2_3: true, labelProp_2_4: 0, labelProp_2_5: false} :Label_0{labelProp_0_0: 0.5402889847755432, labelProp_0_1: "Rajon Rondo", labelProp_0_2: true, labelProp_0_3: "Shaquile O'Neal"} :Label_1{labelProp_1_0: 0.5407509803771973, labelProp_1_1: false, labelProp_1_2: 7, labelProp_1_3: 59, labelProp_1_4: false, labelProp_1_5: 0.4242880046367645})> |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Got 1 rows (time spent 3.987ms/45.361375ms)

Thu, 10 Nov 2022 16:48:32 CST

(root@nebula) [testdb]>

the execution plan:

plan.txt

image

Neo4j report error beacause e is a list so it cannot execute this query match p = (vv)-->()-[e]->() return p;.

but Nebula executes this query and return list of unexplainable results:

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8) 55c198d

How To Reproduce(required)

Steps to reproduce the behavior:

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

Expected behavior

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant