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

Not executable query with two boolean values #470

Closed
stefanak-michal opened this issue Jul 22, 2022 · 2 comments
Closed

Not executable query with two boolean values #470

stefanak-michal opened this issue Jul 22, 2022 · 2 comments
Assignees
Labels

Comments

@stefanak-michal
Copy link

Memgraph version
2.3.1

Environment
Windows, Docker

Describe the bug
If you run query RETURN true, false; you get error Client received exception: Multiple results with the same name 'true' are not allowed..

To Reproduce

  1. Run the following query 'RETURN true, false;'

Expected behavior
I expect to get result with two values true and false.

@Josipmrden
Copy link
Contributor

I have put this task into the backlog.

@antejavor antejavor added the Importance - I2 Importance - I2 label Jun 7, 2023
@gitbuda
Copy link
Member

gitbuda commented Jun 16, 2023

The fix proposed in #502 only applies to this specific case. To solve the problem in general, some additional alias logic is required. It's possible to solve a problem by manually giving aliases to the expressions that boil down to the same stripped value, e.g.:

RETURN 1+2, 3+4;           // fails because that's replaced during the query stripping with 0+0, 0+0
RETURN 1+2 AS x, 3+4 AS y; // OK

@gitbuda gitbuda closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants