Jefffrey commented on code in PR #17891:
URL: https://github.com/apache/datafusion/pull/17891#discussion_r2415393230
##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -687,13 +687,16 @@ impl Accumulator for OrderSensitiveArrayAggAccumulator {
// Convert array to Scalars to sort them easily. Convert back to array
at evaluation.
let array_agg_res =
ScalarValue::convert_array_to_scalar_vec(array_agg_values)?;
- for v in array_agg_res.into_iter() {
- partition_values.push(v.into());
+ for maybe_v in array_agg_res.into_iter() {
+ if let Some(v) = maybe_v {
+ partition_values.push(v.into());
+ } else {
+ partition_values.push(vec![].into());
+ }
Review Comment:
I think it's fine to leave the code as it currently is in this case
--
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]