memgraph / memgraph

Open-source graph database, tuned for dynamic analytics environments. Easy to adopt, scale and own.
https://memgraph.com
Other
2.22k stars 100 forks source link

Inconsistent results about "ORDER BY true" #2119

Open ljhhuxiaoba opened 2 weeks ago

ljhhuxiaoba commented 2 weeks ago

I executed 2 queries on my memgraph database and get an error.

memgraph version:2.17.0 operating system: windows 11 API:Cypher version 9

The first query: OPTIONAL MATCH (n0:L4)-[r0:T0]->(n1:L4)-[r1]-(n2:L0),p0=(n3:L5)-[r2]->(n4:L2:L0) WHERE type(r1)='T0' WITH r1 WHERE (n2.k5<0) RETURN 1

The second query: OPTIONAL MATCH (n0:L4)-[r0:T0]->(n1:L4)-[r1]-(n2:L0),p0=(n3:L5)-[r2]->(n4:L2:L0) WHERE type(r1)='T0' WITH r1 ORDER BY true WHERE (n2.k5<0) RETURN 1

Actual behavior: The second query returns empty but the first does not. And i think adding "ORDER BY true" should not change the result.

To create the graph: graph.txt

katarinasupe commented 2 weeks ago

Hi @ljhhuxiaoba, thank you for reporting this! Is the issue a blocker for you?

ljhhuxiaoba commented 1 week ago

Yes,could you check this issue as soon as possible?