This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 7e4818d66f fix: improve GroupOrdering docs (#20994)
7e4818d66f is described below
commit 7e4818d66f91013e9a1c3bd4bcd7b7040741bf0a
Author: Andrew Lamb <[email protected]>
AuthorDate: Wed Mar 18 14:38:55 2026 -0400
fix: improve GroupOrdering docs (#20994)
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->
- Closes #.
## Rationale for this change
While working on https://github.com/apache/datafusion/pull/20559 I ran
across some comments that were outdated / could be improved
## What changes are included in this PR?
Improve comments
## Are these changes tested?
By CI
## Are there any user-facing changes?
Just better docs
---
.../physical-plan/src/aggregates/order/mod.rs | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/datafusion/physical-plan/src/aggregates/order/mod.rs
b/datafusion/physical-plan/src/aggregates/order/mod.rs
index 183e2b0098..e33a028798 100644
--- a/datafusion/physical-plan/src/aggregates/order/mod.rs
+++ b/datafusion/physical-plan/src/aggregates/order/mod.rs
@@ -52,8 +52,8 @@ impl GroupOrdering {
}
}
- /// Returns how many groups be emitted while respecting the current
ordering
- /// guarantees, or `None` if no data can be emitted
+ /// Returns how many groups can be emitted while respecting the current
+ /// ordering guarantees, or `None` if no data can be emitted.
pub fn emit_to(&self) -> Option<EmitTo> {
match self {
GroupOrdering::None => None,
@@ -84,7 +84,7 @@ impl GroupOrdering {
}
}
- /// Updates the state the input is done
+ /// Updates the state to indicate that the input is complete.
pub fn input_done(&mut self) {
match self {
GroupOrdering::None => {}
@@ -93,8 +93,8 @@ impl GroupOrdering {
}
}
- /// remove the first n groups from the internal state, shifting
- /// all existing indexes down by `n`
+ /// Removes the first `n` groups from the internal state, shifting all
+ /// existing indexes down by `n`.
pub fn remove_groups(&mut self, n: usize) {
match self {
GroupOrdering::None => {}
@@ -103,16 +103,14 @@ impl GroupOrdering {
}
}
- /// Called when new groups are added in a batch
+ /// Called when new groups are added in a batch.
///
- /// * `total_num_groups`: total number of groups (so max
- /// group_index is total_num_groups - 1).
- ///
- /// * `group_values`: group key values for *each row* in the batch
+ /// * `batch_group_values`: group key values for each row in the batch
///
/// * `group_indices`: indices for each row in the batch
///
- /// * `hashes`: hash values for each row in the batch
+ /// * `total_num_groups`: total number of groups (so max
+ /// group_index is total_num_groups - 1).
pub fn new_groups(
&mut self,
batch_group_values: &[ArrayRef],
@@ -135,7 +133,7 @@ impl GroupOrdering {
Ok(())
}
- /// Return the size of memory used by the ordering state, in bytes
+ /// Returns the size of memory used by the ordering state, in bytes.
pub fn size(&self) -> usize {
size_of::<Self>()
+ match self {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]