jayzhan211 commented on PR #8744:
URL: 
https://github.com/apache/arrow-datafusion/pull/8744#issuecomment-1884252351

   > > array_concat(array_slice(array, 0, min(array_length, count)), 
array_repeat(default_array, max(count-array_length), 0))
   > 
   > I think this approach is not a better idea, as supporting the column for 
`max(count-array_length)` in an argument is hard. However, the MutableArray 
could be another direction to consider, just like you did for other functions. 
I will try it as a follow-up PR. @jayzhan211
   
   I think manually create array for `max(count - array_length, 0)` is just one 
iteration for the array. The same as `min(array_length, count)`. After creating 
those two arrays, we can apply `array_concat(array_slice, array_repeat)` easily.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to