Apache DataFusion SQL Query Engine
Fix various typos in aggregation doc (#12301)
张林伟f72622d6fcd2
diff --git a/datafusion/expr-common/src/groups_accumulator.rs b/datafusion/expr-common/src/groups_accumulator.rsindex e66b27d073..156e21d9ae 100644--- a/datafusion/expr-common/src/groups_accumulator.rs+++ b/datafusion/expr-common/src/groups_accumulator.rs@@ -29,7 +29,7 @@ pub enum EmitTo {/// indexes down by `n`.////// For example, if `n=10`, group_index `0, 1, ... 9` are emitted- /// and group indexes '`10, 11, 12, ...` become `0, 1, 2, ...`.+ /// and group indexes `10, 11, 12, ...` become `0, 1, 2, ...`.First(usize),}@@ -113,7 +113,7 @@ pub trait GroupsAccumulator: Send {/// each group, and `evaluate` will produce that running sum as/// its output for all groups, in group_index order///- /// If `emit_to`` is [`EmitTo::All`], the accumulator should+ /// If `emit_to` is [`EmitTo::All`], the accumulator should/// return all groups and release / reset its internal state/// equivalent to when it was first created.///diff --git a/datafusion/physical-plan/src/aggregates/mod.rs b/datafusion/physical-plan/src/aggregates/mod.rsindex 764227e5e7..375c6421b0 100644--- a/datafusion/physical-plan/src/aggregates/mod.rs+++ b/datafusion/physical-plan/src/aggregates/mod.rs@@ -1006,7 +1006,8 @@ pub fn get_finer_aggregate_exprs_requirement(Ok(PhysicalSortRequirement::from_sort_exprs(&requirement))}-/// returns physical expressions for arguments to evaluate against a batch+/// Returns physical expressions for arguments to evaluate against a batch.+////// The expressions are different depending on `mode`:/// * Partial: AggregateFunctionExpr::expressions/// * Final: columns of `AggregateFunctionExpr::state_fields()`diff --git a/datafusion/physical-plan/src/aggregates/order/full.rs b/datafusion/physical-plan/src/aggregates/order/full.rsindex e86d767747..d64c99ba1b 100644--- a/datafusion/physical-plan/src/aggregates/order/full.rs+++ b/datafusion/physical-plan/src/aggregates/order/full.rs@@ -21,7 +21,7 @@ use datafusion_expr::EmitTo;/// group keys////// When the group values are sorted, as soon as we see group `n+1` we-/// know we will never see any rows for group `n again and thus they+/// know we will never see any rows for group `n` again and thus they/// can be emitted.////// For example, given `SUM(amt) GROUP BY id` if the input is sorted@@ -63,7 +63,7 @@ enum State {/// Seen no input yetStart,- /// Data is in progress. `current is the current group for which+ /// Data is in progress. `current` is the current group for which/// values are being generated. Can emit `current` - 1InProgress { current: usize },diff --git a/datafusion/physical-plan/src/aggregates/order/partial.rs b/datafusion/physical-plan/src/aggregates/order/partial.rsindex 73a157f3aa..2cbe3bbb78 100644--- a/datafusion/physical-plan/src/aggregates/order/partial.rs+++ b/datafusion/physical-plan/src/aggregates/order/partial.rs@@ -32,7 +32,7 @@ use std::sync::Arc;/// key and earlier.////// For example, given `SUM(amt) GROUP BY id, state` if the input is-/// sorted by `state, when a new value of `state` is seen, all groups+/// sorted by `state`, when a new value of `state` is seen, all groups/// with prior values of `state` can be emitted.////// The state is tracked like this:diff --git a/datafusion/physical-plan/src/aggregates/row_hash.rs b/datafusion/physical-plan/src/aggregates/row_hash.rsindex d022bb007d..c38137994d 100644--- a/datafusion/physical-plan/src/aggregates/row_hash.rs+++ b/datafusion/physical-plan/src/aggregates/row_hash.rs@@ -95,7 +95,7 @@ struct SpillState {// ========================================================================// STATES:// Fields changes during execution. Can be buffer, or state flags that- // influence the exeuction in parent `GroupedHashAggregateStream`+ // influence the execution in parent `GroupedHashAggregateStream`// ========================================================================/// If data has previously been spilled, the locations of the/// spill files (in Arrow IPC format)