Weijun-H commented on code in PR #21854:
URL: https://github.com/apache/datafusion/pull/21854#discussion_r3142922040


##########
datafusion/functions/src/string/repeat.rs:
##########
@@ -301,12 +285,18 @@ where
         }
     }
 
-    // Fast path: no nulls in either array
-    if string_array.null_count() == 0 && number_array.null_count() == 0 {
+    // Output is null IFF either input is null
+    let nulls = NullBuffer::union(string_array.nulls(), number_array.nulls());

Review Comment:
   Could we add array-level tests for this path? The existing repeat tests 
mostly cover scalar inputs, while this change primarily affects array execution 
and bulk null handling.
   
   It would be useful to cover Utf8/LargeUtf8/Utf8View arrays with interleaved 
nulls, one-sided nulls, and a sliced array with a non-zero null bitmap offset.
   



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