Apache DataFusion SQL Query Engine
Minor: Fix grouping set typo (#12216)
张林伟1fce2a98ef9c
diff --git a/datafusion/physical-optimizer/src/limited_distinct_aggregation.rs b/datafusion/physical-optimizer/src/limited_distinct_aggregation.rsindex e18e530072..8653ad19da 100644--- a/datafusion/physical-optimizer/src/limited_distinct_aggregation.rs+++ b/datafusion/physical-optimizer/src/limited_distinct_aggregation.rs@@ -33,8 +33,8 @@ use itertools::Itertools;/// An optimizer rule that passes a `limit` hint into grouped aggregations which don't require all/// rows in the group to be processed for correctness. Example queries fitting this description are:-/// `SELECT distinct l_orderkey FROM lineitem LIMIT 10;`-/// `SELECT l_orderkey FROM lineitem GROUP BY l_orderkey LIMIT 10;`+/// - `SELECT distinct l_orderkey FROM lineitem LIMIT 10;`+/// - `SELECT l_orderkey FROM lineitem GROUP BY l_orderkey LIMIT 10;`pub struct LimitedDistinctAggregation {}impl LimitedDistinctAggregation {diff --git a/datafusion/physical-plan/src/aggregates/mod.rs b/datafusion/physical-plan/src/aggregates/mod.rsindex b5447a2d73..0f33a9d7b9 100644--- a/datafusion/physical-plan/src/aggregates/mod.rs+++ b/datafusion/physical-plan/src/aggregates/mod.rs@@ -111,9 +111,9 @@ impl AggregateMode {/// Represents `GROUP BY` clause in the plan (including the more general GROUPING SET)/// In the case of a simple `GROUP BY a, b` clause, this will contain the expression [a, b]/// and a single group [false, false].-/// In the case of `GROUP BY GROUPING SET/CUBE/ROLLUP` the planner will expand the expression+/// In the case of `GROUP BY GROUPING SETS/CUBE/ROLLUP` the planner will expand the expression/// into multiple groups, using null expressions to align each group.-/// For example, with a group by clause `GROUP BY GROUPING SET ((a,b),(a),(b))` the planner should+/// For example, with a group by clause `GROUP BY GROUPING SETS ((a,b),(a),(b))` the planner should/// create a `PhysicalGroupBy` like/// ```text/// PhysicalGroupBy {@@ -134,7 +134,7 @@ pub struct PhysicalGroupBy {null_expr: Vec<(Arc<dyn PhysicalExpr>, String)>,/// Null mask for each group in this grouping set. Each group is/// composed of either one of the group expressions in expr or a null- /// expression in null_expr. If `groups[i][j]` is true, then the the+ /// expression in null_expr. If `groups[i][j]` is true, then the/// j-th expression in the i-th group is NULL, otherwise it is `expr[j]`.groups: Vec<Vec<bool>>,}