We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 632ee3e commit 7461211Copy full SHA for 7461211
datafusion/expr/src/aggregate_function.rs
@@ -41,8 +41,6 @@ pub enum AggregateFunction {
41
ArrayAgg,
42
/// N'th value in a group according to some ordering
43
NthValue,
44
- /// Grouping
45
- Grouping,
46
}
47
48
impl AggregateFunction {
@@ -53,7 +51,6 @@ impl AggregateFunction {
53
51
Max => "MAX",
54
52
ArrayAgg => "ARRAY_AGG",
55
NthValue => "NTH_VALUE",
56
- Grouping => "GROUPING",
57
58
59
@@ -73,8 +70,6 @@ impl FromStr for AggregateFunction {
73
70
"min" => AggregateFunction::Min,
74
71
"array_agg" => AggregateFunction::ArrayAgg,
75
72
"nth_value" => AggregateFunction::NthValue,
76
- // other
77
- "grouping" => AggregateFunction::Grouping,
78
_ => {
79
return plan_err!("There is no built-in function named {name}");
80
@@ -119,7 +114,6 @@ impl AggregateFunction {
119
114
coerced_data_types[0].clone(),
120
115
input_expr_nullable[0],
121
116
)))),
122
- AggregateFunction::Grouping => Ok(DataType::Int32),
123
117
AggregateFunction::NthValue => Ok(coerced_data_types[0].clone()),
124
118
125
@@ -141,9 +135,7 @@ impl AggregateFunction {
141
135
pub fn signature(&self) -> Signature {
142
136
// note: the physical expression must accept the type returned by this function or the execution panics.
143
137
match self {
144
- AggregateFunction::Grouping | AggregateFunction::ArrayAgg => {
145
- Signature::any(1, Volatility::Immutable)
146
- }
138
+ AggregateFunction::ArrayAgg => Signature::any(1, Volatility::Immutable),
147
139
AggregateFunction::Min | AggregateFunction::Max => {
148
140
let valid = STRINGS
149
.iter()
datafusion/expr/src/type_coercion/aggregates.rs
@@ -102,7 +102,6 @@ pub fn coerce_types(
102
get_min_max_result_type(input_types)
103
104
AggregateFunction::NthValue => Ok(input_types.to_vec()),
105
- AggregateFunction::Grouping => Ok(vec![input_types[0].clone()]),
106
107
108
datafusion/physical-expr/src/aggregate/build_in.rs
@@ -60,11 +60,6 @@ pub fn create_aggregate_expr(
60
.collect::<Result<Vec<_>>>()?;
61
let input_phy_exprs = input_phy_exprs.to_vec();
62
Ok(match (fun, distinct) {
63
- (AggregateFunction::Grouping, _) => Arc::new(expressions::Grouping::new(
64
- input_phy_exprs[0].clone(),
65
- name,
66
- data_type,
67
- )),
68
(AggregateFunction::ArrayAgg, false) => {
69
let expr = input_phy_exprs[0].clone();
let nullable = expr.nullable(input_schema)?;
datafusion/physical-expr/src/aggregate/grouping.rs
datafusion/physical-expr/src/aggregate/mod.rs
@@ -20,7 +20,6 @@ pub use datafusion_physical_expr_common::aggregate::AggregateExpr;
20
pub(crate) mod array_agg;
21
pub(crate) mod array_agg_distinct;
22
pub(crate) mod array_agg_ordered;
23
-pub(crate) mod grouping;
24
pub(crate) mod nth_value;
25
#[macro_use]
26
pub(crate) mod min_max;
datafusion/physical-expr/src/expressions/mod.rs
@@ -38,7 +38,6 @@ pub use crate::aggregate::array_agg::ArrayAgg;
38
pub use crate::aggregate::array_agg_distinct::DistinctArrayAgg;
39
pub use crate::aggregate::array_agg_ordered::OrderSensitiveArrayAgg;
40
pub use crate::aggregate::build_in::create_aggregate_expr;
-pub use crate::aggregate::grouping::Grouping;
pub use crate::aggregate::min_max::{Max, MaxAccumulator, Min, MinAccumulator};
pub use crate::aggregate::nth_value::NthValueAgg;
pub use crate::aggregate::stats::StatsType;
datafusion/proto/src/logical_plan/from_proto.rs
@@ -140,7 +140,6 @@ impl From<protobuf::AggregateFunction> for AggregateFunction {
protobuf::AggregateFunction::Min => Self::Min,
protobuf::AggregateFunction::Max => Self::Max,
protobuf::AggregateFunction::ArrayAgg => Self::ArrayAgg,
- protobuf::AggregateFunction::Grouping => Self::Grouping,
protobuf::AggregateFunction::NthValueAgg => Self::NthValue,
datafusion/proto/src/logical_plan/to_proto.rs
@@ -111,7 +111,6 @@ impl From<&AggregateFunction> for protobuf::AggregateFunction {
111
AggregateFunction::Min => Self::Min,
112
AggregateFunction::Max => Self::Max,
113
AggregateFunction::ArrayAgg => Self::ArrayAgg,
- AggregateFunction::Grouping => Self::Grouping,
AggregateFunction::NthValue => Self::NthValueAgg,
@@ -372,7 +371,6 @@ pub fn serialize_expr(
372
371
AggregateFunction::ArrayAgg => protobuf::AggregateFunction::ArrayAgg,
373
AggregateFunction::Min => protobuf::AggregateFunction::Min,
374
AggregateFunction::Max => protobuf::AggregateFunction::Max,
375
- AggregateFunction::Grouping => protobuf::AggregateFunction::Grouping,
376
AggregateFunction::NthValue => {
377
protobuf::AggregateFunction::NthValueAgg
378
datafusion/proto/src/physical_plan/to_proto.rs
@@ -24,9 +24,9 @@ use datafusion::physical_expr::window::{NthValueKind, SlidingAggregateWindowExpr
use datafusion::physical_expr::{PhysicalSortExpr, ScalarFunctionExpr};
use datafusion::physical_plan::expressions::{
ArrayAgg, BinaryExpr, CaseExpr, CastExpr, Column, CumeDist, DistinctArrayAgg,
27
- Grouping, InListExpr, IsNotNullExpr, IsNullExpr, Literal, Max, Min, NegativeExpr,
28
- NotExpr, NthValue, NthValueAgg, Ntile, OrderSensitiveArrayAgg, Rank, RankType,
29
- RowNumber, TryCastExpr, WindowShift,
+ InListExpr, IsNotNullExpr, IsNullExpr, Literal, Max, Min, NegativeExpr, NotExpr,
+ NthValue, NthValueAgg, Ntile, OrderSensitiveArrayAgg, Rank, RankType, RowNumber,
+ TryCastExpr, WindowShift,
30
};
31
use datafusion::physical_plan::udaf::AggregateFunctionExpr;
32
use datafusion::physical_plan::windows::{BuiltInWindowExpr, PlainAggregateWindowExpr};
0 commit comments