mustafasrepo commented on code in PR #6881:
URL: https://github.com/apache/arrow-datafusion/pull/6881#discussion_r1257897533
##########
datafusion/core/src/physical_plan/aggregates/mod.rs:
##########
@@ -81,19 +81,33 @@ pub enum AggregateMode {
}
/// Group By expression modes
+///
+/// `PartiallyOrdered` and `FullyOrdered` are used to reason about
+/// when certain group by keys will never again be seen (and thus can
+/// be emitted by the grouping operator).
+///
+/// Specifically, each distinct combination of the relevant columns
+/// are contiguous in the input, and once a new combination is seen
+/// previous combinations are guaranteed never to appear again
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum GroupByOrderMode {
- /// None of the expressions in the GROUP BY clause have an ordering.
+ /// The input is not (known to be) ordered by any of the
+ /// expressions in the GROUP BY clause.
None,
- /// Some of the expressions in the GROUP BY clause have an ordering.
- // For example, if the input is ordered by a, b, c and we group by b, a, d;
- // the mode will be `PartiallyOrdered` meaning a subset of group b, a, d
- // defines a preset for the existing ordering, e.g a, b defines a preset.
+ /// The input is known to be ordered by a preset (prefix but
+ /// possibly reorderd) of the expressions in the `GROUP BY` clause.
Review Comment:
```suggestion
/// possibly reordered) of the expressions in the `GROUP BY` clause.
```
--
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]