Skip to content

Unrelated CALL causes new row to be returned #831

Open
@CelineWuest

Description

I found a discrepancy when running two semantically equivalent queries against an empty database:


1:

CREATE ()<-[:A]-()
RETURN 0 AS n0
	UNION

MATCH ()
CALL { CREATE () RETURN 0 AS n2 SKIP 1 }
RETURN 1 AS n0

Produces:

+----+
| n0 |
+----+
|  0 |
+----+

2:

CREATE ()<-[:A]-()
RETURN 0 AS n0
	UNION
CALL { RETURN 0 AS n1 }
MATCH ()
CALL { CREATE () RETURN 0 AS n2 SKIP 1 }
RETURN 1 AS n0

Produces:

+----+
| n0 |
+----+
|  0 |
|  1 |
+----+

I believe the queries mentioned above are semantically equivalent and thus their result should be the same.

I encountered this issue when testing queries on the FalkorDB master branch in a Docker container running redis:7.2.3-bookworm.

Steps to reproduce

Run the aforementioned, semantically equivalent, queries against an empty database and observe that their results differ.

Expected behavior

The queries should result in the same behavior

Actual behavior

The query results differ

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions