tustvold commented on code in PR #5086:
URL: https://github.com/apache/arrow-rs/pull/5086#discussion_r1398272017


##########
arrow-select/src/zip.rs:
##########
@@ -56,15 +76,36 @@ pub fn zip(
     SlicesIterator::new(mask).for_each(|(start, end)| {
         // the gap needs to be filled with falsy values
         if start > filled {
-            mutable.extend(1, filled, start);
+            if falsy_is_scalar {
+                for _ in filled..start {
+                    // Copy the first item from the 'falsy' array into the 
output buffer.
+                    mutable.extend(1, 0, 1);

Review Comment:
   This is kind of unfortunate, but there aren't really many good alternatives 
that occur to me. Ultimately if this kernel shows up a bottleneck, it should be 
relatively straightforward to special case for primitives, etc... like we do 
for the other selection kernels



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

Reply via email to