lyne7-sc commented on code in PR #20049:
URL: https://github.com/apache/datafusion/pull/20049#discussion_r2742110208


##########
datafusion/functions-nested/src/repeat.rs:
##########
@@ -243,56 +240,75 @@ fn general_list_repeat<O: OffsetSizeTrait>(
     list_array: &GenericListArray<O>,
     count_array: &UInt64Array,
 ) -> Result<ArrayRef> {
-    let data_type = list_array.data_type();
-    let value_type = list_array.value_type();
-    let mut new_values = vec![];
+    let counts = count_array.values();

Review Comment:
   will produce an empty array. This function seems to assume `count[i] >= 0` 
and doesn’t handle count[i] being null. This also confused me, but I kept the 
original behavior since I’m not sure whether existing users rely on null count 
being treated as empty array.



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