Skip to content

Conversation

joroKr21
Copy link
Contributor

@joroKr21 joroKr21 commented Oct 20, 2025

Which issue does this PR close?

  • Closes #.

Rationale for this change

According to three-valued logic we should return null and that's also what happens when the argument is not a constant as seen in the test.

What changes are included in this PR?

Updated ArrayHas::simplify to explicitly handle null

Are these changes tested?

Updated the array_has SQL test and added unit tests

Are there any user-facing changes?

Yes, a minor change in behaviour wrt null

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Oct 20, 2025
@joroKr21 joroKr21 force-pushed the bugfix/array-has branch 3 times, most recently from 62dd628 to 19c53c1 Compare October 20, 2025 21:16
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

I think we need at least two tests; one to test the change to simplification, and one to test the change to handing the first argument being null in invoke_with_args

Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Weijun-H Weijun-H added this pull request to the merge queue Oct 22, 2025
@Weijun-H
Copy link
Member

Thanks @joroKr21 and @Jefffrey

Merged via the queue into apache:main with commit 114beec Oct 22, 2025
29 checks passed
@joroKr21 joroKr21 deleted the bugfix/array-has branch October 22, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants