ologlogn commented on code in PR #22597:
URL: https://github.com/apache/datafusion/pull/22597#discussion_r3323688165
##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -1008,7 +1008,13 @@ impl OrderSensitiveArrayAggAccumulator {
} else {
(0..fields.len())
.map(|i| {
- let column_values = self.ordering_values.iter().map(|x|
x[i].clone());
+ let column_values: Box<dyn Iterator<Item = ScalarValue>> =
if self
+ .reverse
+ {
+ Box::new(self.ordering_values.iter().rev().map(|x|
x[i].clone()))
+ } else {
+ Box::new(self.ordering_values.iter().map(|x|
x[i].clone()))
+ };
Review Comment:
added a regression test~ it fails without the fix.
--
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]