jayzhan211 commented on code in PR #8439:
URL: https://github.com/apache/arrow-datafusion/pull/8439#discussion_r1417449889
##########
datafusion/physical-expr/src/aggregate/array_agg_ordered.rs:
##########
@@ -231,13 +231,27 @@ impl Accumulator for OrderSensitiveArrayAggAccumulator {
partition_values.push(v);
}
- let orderings =
ScalarValue::convert_array_to_scalar_vec(agg_orderings)?;
- // Ordering requirement expression values for each entry in the
ARRAY_AGG list
- let other_ordering_values =
self.convert_array_agg_to_orderings(orderings)?;
- for v in other_ordering_values.into_iter() {
- partition_ordering_values.push(v);
+ // Get the inner struct array
+ let ordering_array = agg_orderings.value(0);
+ let orderings =
ScalarValue::convert_array_to_scalar_vec(&ordering_array)?
Review Comment:
I think we always have ListArray(StructArray) for `agg_orderings`, so we can
safely get `orderings` with `convert_array_to_scalar_vec` only.
--
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]