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

Incorrect query result #5147

Closed
nebula-bots opened this issue Dec 28, 2022 · 0 comments · Fixed by #5148
Closed

Incorrect query result #5147

nebula-bots opened this issue Dec 28, 2022 · 0 comments · Fixed by #5148
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)

Look at the queries below,

the first query pa2 is correctly returned:

(root@nebula) [gdlancer]> MATCH (v0)-[e0]->()<-[e1]-(:Label_2) WHERE (id(v0) in [16, 8, 10, 4, 3, 1, 23, 15, 5, 6, 29]) AND (e0.Rel_0_0_Bool) MATCH (v1:Label_6:Label_3)<-[e2:Rel_1]-(:Label_5)-[e3]->(v2) WHERE (id(v1) in [20, 28, 31, 6, 4, 18, 15, 25, 9, 19, 21]) AND (e0.Rel_0_0_Bool) MATCH p0 = (v2)<-[e4]-()-[e5]->(v3:Label_6) WHERE (e5.Rel_0_0_Bool) WITH min(e3.Rel_2_1_Double) AS pa0, ((- ((((e3.Rel_2_1_Double - e3.Rel_2_1_Double) / (79 / v2.Label_0.Label_0_5_Int)) + e4.Rel_3_3_Int) + (e5.Rel_0_3_Int * e1.Rel_3_3_Int))) / e5.Rel_0_3_Int) AS pa1, e3, v3.Label_6.Label_6_1_Bool AS pa2, (v2.Label_0.Label_0_5_Int / e5.Rel_0_4_Double) AS pa3, 0.089742 AS pa4, ((- 0.756717) == ((- (- e4.Rel_2_1_Double)) - (- v2.Label_0.Label_0_4_Int))) AS pa5, e2 WHERE true RETURN pa2
+------+
| pa2  |
+------+
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
| true |
+------+
Got 14 rows (time spent 7.652ms/21.0935ms)

Tue, 27 Dec 2022 17:02:25 CST

and if add pa2 as a filter, graphd complained about BAD_TYPE and the total rows is alow wrong:

(root@nebula) [gdlancer]> MATCH (v0)-[e0]->()<-[e1]-(:Label_2) WHERE (id(v0) in [16, 8, 10, 4, 3, 1, 23, 15, 5, 6, 29]) AND (e0.Rel_0_0_Bool) MATCH (v1:Label_6:Label_3)<-[e2:Rel_1]-(:Label_5)-[e3]->(v2) WHERE (id(v1) in [20, 28, 31, 6, 4, 18, 15, 25, 9, 19, 21]) AND (e0.Rel_0_0_Bool) MATCH p0 = (v2)<-[e4]-()-[e5]->(v3:Label_6) WHERE (e5.Rel_0_0_Bool) WITH min(e3.Rel_2_1_Double) AS pa0, ((- ((((e3.Rel_2_1_Double - e3.Rel_2_1_Double) / (79 / v2.Label_0.Label_0_5_Int)) + e4.Rel_3_3_Int) + (e5.Rel_0_3_Int * e1.Rel_3_3_Int))) / e5.Rel_0_3_Int) AS pa1, e3, v3.Label_6.Label_6_1_Bool AS pa2, (v2.Label_0.Label_0_5_Int / e5.Rel_0_4_Double) AS pa3, 0.089742 AS pa4, ((- 0.756717) == ((- (- e4.Rel_2_1_Double)) - (- v2.Label_0.Label_0_4_Int))) AS pa5, e2 WHERE pa2 RETURN pa2
+----------+
| pa2      |
+----------+
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
| BAD_TYPE |
+----------+
Got 48 rows (time spent 7.91ms/21.079958ms)

Tue, 27 Dec 2022 17:03:58 CST

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8) 9863ff0 (community edition)

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 28, 2022
@Sophie-Xie Sophie-Xie added this to the v3.4.0 milestone Dec 29, 2022
@github-actions github-actions bot added the process/fixed Process of bug label Dec 29, 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.

3 participants