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

NONE BETWEEN has incorrect behavior #5508

Closed
sync-by-unito bot opened this issue May 19, 2022 · 4 comments · Fixed by #5509
Closed

NONE BETWEEN has incorrect behavior #5508

sync-by-unito bot opened this issue May 19, 2022 · 4 comments · Fixed by #5509
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented May 19, 2022

In RQL, you are allowed to use the array operators <ALL/NONE/ANY> with BETWEEN. The way RQL parses the BETWEEN operator is to make it into a >= AND <=. For example, x BETWEEN {0, 10} gets parsed to {}x >= 0 AND x <= 10{}. This presents issues in conjunction with the NONE operator, since a query like NONE x BETWEEN {0, 10} will get parsed to {}NONE x >= 0 AND NONE x <= 10{}, which does not correctly represent the intention of the NONE query (for example, -1 would not match since it is <= 10 even though it is outside of the BETWEEN range)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 19, 2022

➤ On 2022-04-22, Jørgen Edelbo commented:

The support for BETWEEN was only done an an afterthought, and the use on NONE is apparently not working as expected. It will require substantial work to implement it properly, so short term we should probably just not allow it to be used.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 19, 2022

➤ On 2022-05-03, Ben Redmond commented:

This sounds good to me. I merged a change to explicitly disallow NONE BETWEEN queries on the server. Can we make a similar change on the client side as well?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 19, 2022

➤ On 2022-05-04, Jørgen Edelbo commented:

Yes, that should be a small change.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 23, 2022

➤ Jørgen Edelbo commented:

[~[email protected]] I found out that ANY had a similar problem, so I disallowed that as well.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant