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

Wrong comparisons of paths involving self-reflective edges #5187

Closed
xtcyclist opened this issue Jan 3, 2023 · 1 comment · Fixed by #5444
Closed

Wrong comparisons of paths involving self-reflective edges #5187

xtcyclist opened this issue Jan 3, 2023 · 1 comment · Fixed by #5444
Assignees
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@xtcyclist
Copy link
Contributor

Wrong result:

(root@nebula) [test]> match p = (v:Label_5)-[e:Rel_0]->(v1:Label_1), p2 = (v)-[e1:Rel_0]-(v1) where id(v) == 47 and p != p2 and e == e1 and v == v and v1 == v1 return count(*)
+----------+
| count(*) |
+----------+
| 1        |
+----------+

Expected:

(root@nebula) [test]> match p = (v:Label_5)-[e:Rel_0]->(v1:Label_1), p2 = (v)-[e1:Rel_0]-(v1) where id(v) == 47 and p != p2 and e == e1 and v == v and v1 == v1 return count(*)
+----------+
| count(*) |
+----------+
| 0        |
+----------+

The first patten p asks for directed edges for e. The second one asks for edges of both directions for e1. They matched the same identical self-reflective edge. But the paths are considered not to be equal.

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | e1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [:Rel_0 47->47 @0 {Rel_0_0_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_10_geography_linestring: LINESTRING(62 36, 37 3), Rel_0_1_Bool: true, Rel_0_2_String: "'Aron Baynes'", Rel_0_3_Double: 0.39193, Rel_0_4_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_5_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_6_datetime: 2023-01-03T07:30:11.463000, Rel_0_7_Double: 0.078585, Rel_0_8_timestamp: 1672731011, Rel_0_9_geography_point: POINT(63 52)}] | [:Rel_0 47->47 @0 {Rel_0_0_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_10_geography_linestring: LINESTRING(62 36, 37 3), Rel_0_1_Bool: true, Rel_0_2_String: "'Aron Baynes'", Rel_0_3_Double: 0.39193, Rel_0_4_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_5_geography_polygon: POLYGON((0 1, 1 2, 2 3, 0 1)), Rel_0_6_datetime: 2023-01-03T07:30:11.463000, Rel_0_7_Double: 0.078585, Rel_0_8_timestamp: 1672731011, Rel_0_9_geography_point: POINT(63 52)}] |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Got 1 rows (time spent 26666/27189 us)
@xtcyclist xtcyclist added the type/bug Type: something is unexpected label Jan 3, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Jan 3, 2023
@xtcyclist xtcyclist self-assigned this Jan 3, 2023
@Sophie-Xie Sophie-Xie modified the milestones: v3.4.0, v3.5.0 Jan 3, 2023
@xtcyclist
Copy link
Contributor Author

同一条的边的正反边被认为是不一样的边。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. process/fixed Process of bug severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants