viirya commented on code in PR #7565:
URL: https://github.com/apache/arrow-datafusion/pull/7565#discussion_r1327693228
##########
datafusion/physical-expr/src/aggregate/first_last.rs:
##########
@@ -237,13 +231,17 @@ impl Accumulator for FirstValueAccumulator {
};
if !ordered_states[0].is_empty() {
let first_row = get_row_at_idx(&ordered_states, 0)?;
- let first_ordering = &first_row[1..];
+ // When collecting orderings, we exclude the is_set flag from the
state.
+ let first_ordering = &first_row[1..is_set_idx];
Review Comment:
Doesn't `filtered_states` come from `states`? Why they have different
index?? They are simply partial aggregation inputs. Do you think there are
different rows in partial aggregation inputs?
--
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]