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

Unexpected SyntaxError in toBoolean ∘ all #13432

Open
DominicWuest opened this issue Mar 26, 2024 · 0 comments
Open

Unexpected SyntaxError in toBoolean ∘ all #13432

DominicWuest opened this issue Mar 26, 2024 · 0 comments

Comments

@DominicWuest
Copy link

When running the following query:

RETURN (CASE toBoolean(all(n0 IN null WHERE true)) WHEN false THEN 0 END)

I encountered the following error:

Neo4jError: Neo.ClientError.Statement.SyntaxError (Invalid input 'toBoolean': expected "WHEN" (line 1, column 14 (offset: 13))
"RETURN (CASE toBoolean(all(n0 IN null WHERE true)) WHEN false THEN 0 END)"
              ^)

I believe the query mentioned above is semantically and syntactically correct and thus no error should be thrown here.

I encountered this issue when testing queries against the Neo4j 5.18.0 community & enterprise version in a Docker container running alpine v.3.

Similarly, running

RETURN toBoolean(all(n0 IN [] WHERE true))

results in the following error:

Neo4jError: Neo.ClientError.Statement.SyntaxError (Invalid input 'WHERE': expected
  [...]
  "^" (line 1, column 31 (offset: 30))
"RETURN toBoolean(all(n0 IN [] WHERE true))"
                               ^)

Steps to reproduce

Run the following queries and observe it throws an error:

RETURN (CASE toBoolean(all(n0 IN null WHERE true)) WHEN false THEN 0 END)

Expected behavior

The query should run successfully

Actual behavior

The query fails with the error message SyntaxError (Invalid input 'toBoolean': expected "WHEN")

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

No branches or pull requests

3 participants