Skip to content

[Backport] SCALAR_IN_ARRAY: Optimization and behavioral follow-ups.#16398

Merged
cryptoe merged 1 commit intoapache:30.0.0from
adarshsanjeev:backport-16311-to-30.0.0
May 8, 2024
Merged

[Backport] SCALAR_IN_ARRAY: Optimization and behavioral follow-ups.#16398
cryptoe merged 1 commit intoapache:30.0.0from
adarshsanjeev:backport-16311-to-30.0.0

Conversation

@adarshsanjeev
Copy link
Copy Markdown
Contributor

Backport of #16311 to 30.0.0.

* Four changes to scalar_in_array as follow-ups to apache#16306:

1) Align behavior for `null` scalars to the behavior of the native `in` and `inType` filters: return `true` if the array itself contains null, else return `null`.

2) Rename the class to more closely match the function name.

3) Add a specialization for constant arrays, where we build a `HashSet`.

4) Use `castForEqualityComparison` to properly handle cross-type comparisons.
   Additional tests verify comparisons between LONG and DOUBLE are now
   handled properly.

* Fix spelling.

* Adjustments from review.
@cryptoe cryptoe merged commit 0176be9 into apache:30.0.0 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants