freakyzoidberg commented on code in PR #23337:
URL: https://github.com/apache/datafusion/pull/23337#discussion_r3571259333
##########
datafusion/functions-nested/src/array_has.rs:
##########
@@ -323,11 +325,26 @@ impl<'a> ArrayWrapper<'a> {
}
}
+/// Evaluate `array_has` with an array (per-row) needle.
+///
+/// The straightforward implementation compares each row with the Arrow `eq`
+/// kernel, which allocates a `BooleanArray` and pays dispatch on every row --
+/// overhead that dominates for short lists. Primitive and string element types
+/// therefore take [`array_has_array_fast_path`]; nested (and any other) types
+/// fall back to the per-row kernel.
fn array_has_dispatch_for_array<'a>(
haystack: ArrayWrapper<'a>,
needle: &ArrayRef,
) -> Result<ArrayRef> {
let combined_nulls = NullBuffer::union(haystack.nulls(), needle.nulls());
+
+ if let Some(values) =
+ array_has_array_fast_path(&haystack, needle, combined_nulls.as_ref())
Review Comment:
Went with your second suggestion, inlined the body into
array_has_dispatch_for_array and deleted array_has_array_fast_path entirely.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]