jayzhan211 commented on code in PR #12460:
URL: https://github.com/apache/datafusion/pull/12460#discussion_r1759616682


##########
datafusion/functions-nested/src/array_has.rs:
##########
@@ -203,24 +192,26 @@ fn array_has_dispatch_for_scalar<O: OffsetSizeTrait>(
         return Ok(Arc::new(BooleanArray::from(vec![Some(false)])));
     }
     let eq_array = compare_with_eq(values, needle, is_nested)?;
-    let mut final_contained = vec![None; haystack.len()];
-    for (i, offset) in offsets.windows(2).enumerate() {
+    let mut final_contained = BooleanArray::builder(haystack.len());

Review Comment:
   Is using builder faster then `From<Vec>`?



-- 
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]

Reply via email to