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

fix(sql): IN with NULLs and STRINGs sometimes may return the wrong result #4499

Merged
merged 3 commits into from
May 14, 2024

Conversation

nwoolmer
Copy link
Contributor

Closes #4496

The NullConstant args were being added to the deferred symbol list. This isn't initialised until init().

However, the result was requested early by functionToConstant0 meaning it wasn't being picked up.

Fix is to stop NullConstant being deferred.

… being picked up by deferred list, so make sure it doesn't instead.
@nwoolmer nwoolmer added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels May 13, 2024
@ideoma
Copy link
Collaborator

ideoma commented May 14, 2024

[PR Coverage check]

😍 pass : 2 / 2 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/griffin/engine/functions/bool/InStrFunctionFactory.java 1 1 100.00%
🔵 io/questdb/griffin/engine/functions/bool/InVarcharFunctionFactory.java 1 1 100.00%

@ideoma ideoma merged commit 6fb88e4 into master May 14, 2024
24 checks passed
@ideoma ideoma deleted the nw_fix_in_str branch May 14, 2024 16:13
@nwoolmer
Copy link
Contributor Author

Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect result when having NULL with IN operation
4 participants