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

Node not created when including an inconsequential FOREACH #637

Open
DominicWuest opened this issue Apr 15, 2024 · 0 comments
Open

Node not created when including an inconsequential FOREACH #637

DominicWuest opened this issue Apr 15, 2024 · 0 comments

Comments

@DominicWuest
Copy link

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


1:

WITH 0 AS n0 SKIP 1
CALL {
  MERGE ()
}

Creates a node.


2:

WITH 0 AS n0 SKIP 1
CALL {
  FOREACH (n1 IN [] | MERGE () )
  MERGE ()
}

Does not create a node.


I believe the queries mentioned above are semantically equivalent and thus their result should be the same.
The FOREACH iterates over an empty list, so it shouldn't have an effect on the outcome.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant