Apache DataFusion SQL Query Engine
minor: rename aggregate stream modules to match contents (#23372)
Andrew Lamb99ccfc3c165b
diff --git a/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs b/datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rsindex 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.rsindex 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.rssimilarity index 100%rename from datafusion/physical-plan/src/aggregates/no_grouping.rsrename to datafusion/physical-plan/src/aggregates/aggregate_stream.rsdiff --git a/datafusion/physical-plan/src/aggregates/row_hash.rs b/datafusion/physical-plan/src/aggregates/grouped_hash_stream.rssimilarity index 99%rename from datafusion/physical-plan/src/aggregates/row_hash.rsrename to datafusion/physical-plan/src/aggregates/grouped_hash_stream.rsindex 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.rssimilarity index 100%rename from datafusion/physical-plan/src/aggregates/topk_stream.rsrename to datafusion/physical-plan/src/aggregates/grouped_topk_stream.rsdiff --git a/datafusion/physical-plan/src/aggregates/hash_aggregate.rs b/datafusion/physical-plan/src/aggregates/hash_stream.rssimilarity index 99%rename from datafusion/physical-plan/src/aggregates/hash_aggregate.rsrename to datafusion/physical-plan/src/aggregates/hash_stream.rsindex 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.rsindex 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.rsindex 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.rsindex 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<()> {