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 eq_any's nullability #4354

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Ten0
Copy link
Member

@Ten0 Ten0 commented Nov 20, 2024

PG returns null for IN expressions if LHS is null or if result depends on a NULL inner element of the array.
The return value of the IN & co expressions was incorrectly represented as non-nullable in this case.

While this is a breaking change, it should probably also be considered a bugfix, so we should be able to release it.

Copy link

@kw217 kw217 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, and the test is very clear - thank you. I agree this is technically a bugfix, but I fear it has the potential to cause quite a bit of breakage so I'm nervous about releasing it. Do we have any way of checking impact (e.g., anything like crater?). Anyone who has a nullable column that actually never has null in it, and uses eq_any, will have been getting away with this and will be surprised by the change.

@Ten0
Copy link
Member Author

Ten0 commented Nov 21, 2024

I imagine most uses of eq_any are actually to filter, and because filter accepts both they will keep compiling.
We have 500 uses of eq_any in our codebase and all of those are .filter.

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

Successfully merging this pull request may close these issues.

2 participants