You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/07/07 18:59:37 UTC

(datafusion) branch gh-readonly-queue/main/pr-23372-67ff4e4f7ad57a29d5ba7eb53449bcc863985d4c created (now 99ccfc3c16)

This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a change to branch gh-readonly-queue/main/pr-23372-67ff4e4f7ad57a29d5ba7eb53449bcc863985d4c
in repository https://gitbox.apache.org/repos/asf/datafusion.git


      at 99ccfc3c16 minor: rename aggregate stream modules to match contents (#23372)

This branch includes the following new commits:

     new 99ccfc3c16 minor: rename aggregate stream modules to match contents (#23372)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org


(datafusion) 01/01: minor: rename aggregate stream modules to match contents (#23372)

Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-23372-67ff4e4f7ad57a29d5ba7eb53449bcc863985d4c
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit 99ccfc3c165b87b56ea4540c8f427af2c9a13131
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Tue Jul 7 14:32:01 2026 -0400

    minor: rename aggregate stream modules to match contents (#23372)
    
    ## Which issue does this PR close?
    
    - Part of https://github.com/apache/datafusion/issues/22710
    
    ## Rationale for this change
    
    @Rachelint and @2010YOUY01 and I are working to refactor the grouping
    code into a more understandable structure. Part of this is the names of
    modules.
    
    Several aggregate stream implementations are stored in modules whose
    file names do not match the primary stream types they contain. This
    makes the aggregate module harder to scan because some stream files use
    the `_stream.rs` suffix while others are named with other styles.
    
    ## What changes are included in this PR?
    
    This PR renames aggregate stream modules so their filenames match the
    stream implementations more closely:
    
    - `no_grouping.rs` -> `aggregate_stream.rs`
    - `hash_aggregate.rs` -> `hash_stream.rs`
    - `row_hash.rs` -> `grouped_hash_stream.rs`
    - `topk_stream.rs` -> `grouped_topk_stream.rs`
    
    It also updates private module declarations, imports, and doc
    links/comments that referenced the old module names.
    
    ## Are these changes tested?
    
    No new tests are included because this is a module/file rename with no
    behavioral changes.
    
    ## Are there any user-facing changes?
    
    No. These modules are private implementation details of
    `datafusion-physical-plan`.
---
 .../src/aggregates/aggregate_hash_table/common.rs      |  2 +-
 .../aggregates/aggregate_hash_table/common_ordered.rs  |  2 +-
 .../aggregates/{no_grouping.rs => aggregate_stream.rs} |  0
 .../aggregates/{row_hash.rs => grouped_hash_stream.rs} |  2 +-
 .../{topk_stream.rs => grouped_topk_stream.rs}         |  0
 .../aggregates/{hash_aggregate.rs => hash_stream.rs}   |  2 +-
 datafusion/physical-plan/src/aggregates/mod.rs         | 18 +++++++++---------
 .../src/aggregates/partial_reduce_stream.rs            |  2 +-
 .../physical-plan/src/aggregates/skip_partial.rs       |  6 +++---
 9 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs b/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs
index a435360ca3..f29f3e7ff8 100644
--- a/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs
+++ b/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs
@@ -28,8 +28,8 @@ use datafusion_physical_expr::aggregate::AggregateFunctionExpr;
 
 use crate::PhysicalExpr;
 use crate::aggregates::group_values::{GroupByMetrics, GroupValues, new_group_values};
+use crate::aggregates::grouped_hash_stream::create_group_accumulator;
 use crate::aggregates::order::GroupOrdering;
-use crate::aggregates::row_hash::create_group_accumulator;
 use crate::aggregates::{
     AggregateExec, PhysicalGroupBy, aggregate_expressions, evaluate_group_by,
 };
diff --git a/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common_ordered.rs b/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common_ordered.rs
index a98cc92c20..c83303c51d 100644
--- a/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common_ordered.rs
+++ b/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common_ordered.rs
@@ -31,8 +31,8 @@ use datafusion_expr::EmitTo;
 use crate::InputOrderMode;
 use crate::PhysicalExpr;
 use crate::aggregates::group_values::{GroupByMetrics, GroupValues, new_group_values};
+use crate::aggregates::grouped_hash_stream::create_group_accumulator;
 use crate::aggregates::order::GroupOrdering;
-use crate::aggregates::row_hash::create_group_accumulator;
 use crate::aggregates::{
     AggregateExec, AggregateMode, PhysicalGroupBy, aggregate_expressions,
     evaluate_group_by,
diff --git a/datafusion/physical-plan/src/aggregates/no_grouping.rs b/datafusion/physical-plan/src/aggregates/aggregate_stream.rs
similarity index 100%
rename from datafusion/physical-plan/src/aggregates/no_grouping.rs
rename to datafusion/physical-plan/src/aggregates/aggregate_stream.rs
diff --git a/datafusion/physical-plan/src/aggregates/row_hash.rs b/datafusion/physical-plan/src/aggregates/grouped_hash_stream.rs
similarity index 99%
rename from datafusion/physical-plan/src/aggregates/row_hash.rs
rename to datafusion/physical-plan/src/aggregates/grouped_hash_stream.rs
index 37b2473f4f..0d00e5c4d0 100644
--- a/datafusion/physical-plan/src/aggregates/row_hash.rs
+++ b/datafusion/physical-plan/src/aggregates/grouped_hash_stream.rs
@@ -1413,7 +1413,7 @@ mod tests {
     use datafusion_physical_expr::aggregate::AggregateExprBuilder;
     use datafusion_physical_expr::expressions::col;
 
-    // Migrated to PartialHashAggregateStream coverage in hash_aggregate.rs;
+    // Migrated to PartialHashAggregateStream coverage in hash_stream.rs;
     // kept here for the legacy GroupedHashAggregateStream implementation.
     #[tokio::test]
     async fn test_double_emission_race_condition_bug() -> Result<()> {
diff --git a/datafusion/physical-plan/src/aggregates/topk_stream.rs b/datafusion/physical-plan/src/aggregates/grouped_topk_stream.rs
similarity index 100%
rename from datafusion/physical-plan/src/aggregates/topk_stream.rs
rename to datafusion/physical-plan/src/aggregates/grouped_topk_stream.rs
diff --git a/datafusion/physical-plan/src/aggregates/hash_aggregate.rs b/datafusion/physical-plan/src/aggregates/hash_stream.rs
similarity index 99%
rename from datafusion/physical-plan/src/aggregates/hash_aggregate.rs
rename to datafusion/physical-plan/src/aggregates/hash_stream.rs
index 4c8756c0e8..62b9296503 100644
--- a/datafusion/physical-plan/src/aggregates/hash_aggregate.rs
+++ b/datafusion/physical-plan/src/aggregates/hash_stream.rs
@@ -21,7 +21,7 @@
 //! for details.
 //!
 //! Note these streams are an incremental migration of the existing
-//! [`crate::aggregates::row_hash::GroupedHashAggregateStream`].
+//! [`crate::aggregates::grouped_hash_stream::GroupedHashAggregateStream`].
 //!
 //! See issue for details: <https://github.com/apache/datafusion/issues/22710>
 
diff --git a/datafusion/physical-plan/src/aggregates/mod.rs b/datafusion/physical-plan/src/aggregates/mod.rs
index 11446137f3..d7c72253ec 100644
--- a/datafusion/physical-plan/src/aggregates/mod.rs
+++ b/datafusion/physical-plan/src/aggregates/mod.rs
@@ -22,13 +22,13 @@ use std::sync::Arc;
 
 use super::{DisplayAs, ExecutionPlanProperties, PlanProperties};
 use crate::aggregates::{
-    hash_aggregate::{FinalHashAggregateStream, PartialHashAggregateStream},
-    no_grouping::AggregateStream,
+    aggregate_stream::AggregateStream,
+    grouped_hash_stream::GroupedHashAggregateStream,
+    grouped_topk_stream::GroupedTopKAggregateStream,
+    hash_stream::{FinalHashAggregateStream, PartialHashAggregateStream},
     ordered_final_stream::OrderedFinalAggregateStream,
     ordered_partial_stream::OrderedPartialAggregateStream,
     partial_reduce_stream::PartialReduceHashAggregateStream,
-    row_hash::GroupedHashAggregateStream,
-    topk_stream::GroupedTopKAggregateStream,
 };
 use crate::execution_plan::{CardinalityEffect, EmissionType};
 use crate::filter_pushdown::{
@@ -76,17 +76,17 @@ use topk::hash_table::is_supported_hash_key_type;
 use topk::heap::is_supported_heap_type;
 
 mod aggregate_hash_table;
+mod aggregate_stream;
 pub mod group_values;
-mod hash_aggregate;
-mod no_grouping;
+mod grouped_hash_stream;
+mod grouped_topk_stream;
+mod hash_stream;
 pub mod order;
 mod ordered_final_stream;
 mod ordered_partial_stream;
 mod partial_reduce_stream;
-mod row_hash;
 mod skip_partial;
 mod topk;
-mod topk_stream;
 
 /// Returns true if TopK aggregation data structures support the provided key and value types.
 ///
@@ -3199,7 +3199,7 @@ mod tests {
         let aggregates_v0: Vec<Arc<AggregateFunctionExpr>> =
             vec![Arc::new(test_median_agg_expr(Arc::clone(&input_schema))?)];
 
-        // use fast-path in `row_hash.rs`.
+        // use fast-path in `grouped_hash_stream.rs`.
         let aggregates_v2: Vec<Arc<AggregateFunctionExpr>> = vec![Arc::new(
             AggregateExprBuilder::new(avg_udaf(), vec![col("b", &input_schema)?])
                 .schema(Arc::clone(&input_schema))
diff --git a/datafusion/physical-plan/src/aggregates/partial_reduce_stream.rs b/datafusion/physical-plan/src/aggregates/partial_reduce_stream.rs
index 1a4980c898..2f4535e66f 100644
--- a/datafusion/physical-plan/src/aggregates/partial_reduce_stream.rs
+++ b/datafusion/physical-plan/src/aggregates/partial_reduce_stream.rs
@@ -18,7 +18,7 @@
 //! Partial-reduce hash aggregation stream implementation.
 //!
 //! This stream is part of the incremental migration from
-//! [`crate::aggregates::row_hash::GroupedHashAggregateStream`].
+//! [`crate::aggregates::grouped_hash_stream::GroupedHashAggregateStream`].
 //!
 //! See issue for details: <https://github.com/apache/datafusion/issues/22710>
 
diff --git a/datafusion/physical-plan/src/aggregates/skip_partial.rs b/datafusion/physical-plan/src/aggregates/skip_partial.rs
index 903235f950..20e17d2b27 100644
--- a/datafusion/physical-plan/src/aggregates/skip_partial.rs
+++ b/datafusion/physical-plan/src/aggregates/skip_partial.rs
@@ -22,7 +22,7 @@ use crate::metrics;
 /// Tracks if the aggregate should skip partial aggregations
 ///
 /// See "partial aggregation" discussion on
-/// [`crate::aggregates::row_hash::GroupedHashAggregateStream`].
+/// [`crate::aggregates::grouped_hash_stream::GroupedHashAggregateStream`].
 pub(super) struct SkipAggregationProbe {
     // ========================================================================
     // PROPERTIES:
@@ -117,7 +117,7 @@ impl SkipAggregationProbe {
 #[cfg(test)]
 mod tests {
     use super::*;
-    use crate::aggregates::row_hash::GroupedHashAggregateStream;
+    use crate::aggregates::grouped_hash_stream::GroupedHashAggregateStream;
     use crate::aggregates::{AggregateExec, AggregateMode, PhysicalGroupBy};
     use crate::execution_plan::ExecutionPlan;
     use crate::test::TestMemoryExec;
@@ -134,7 +134,7 @@ mod tests {
     use datafusion_physical_expr::expressions::col;
     use futures::StreamExt;
 
-    // Migrated to PartialHashAggregateStream coverage in hash_aggregate.rs;
+    // Migrated to PartialHashAggregateStream coverage in hash_stream.rs;
     // kept here for the legacy GroupedHashAggregateStream implementation.
     #[tokio::test]
     async fn test_skip_aggregation_probe_not_locked_until_skip() -> Result<()> {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org