Skip to content

Commit 4e1e864

Browse files
authored
chore: remove unused settings for aggregation (#19103)
1 parent b70de3a commit 4e1e864

File tree

11 files changed

+2
-162
lines changed

11 files changed

+2
-162
lines changed

src/query/service/src/physical_plans/physical_aggregate_final.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ impl IPhysicalPlan for AggregateFinal {
144144
fn build_pipeline2(&self, builder: &mut PipelineBuilder) -> Result<()> {
145145
let max_block_rows = builder.settings.get_max_block_size()? as usize;
146146
let max_block_bytes = builder.settings.get_max_block_bytes()? as usize;
147-
let enable_experimental_aggregate_hashtable = builder
148-
.settings
149-
.get_enable_experimental_aggregate_hashtable()?;
147+
150148
let max_spill_io_requests = builder.settings.get_max_spill_io_requests()?;
151149
let max_restore_worker = builder.settings.get_max_aggregate_restore_worker()?;
152150
let enable_experiment_aggregate = builder.settings.get_enable_experiment_aggregate()?;
@@ -160,7 +158,6 @@ impl IPhysicalPlan for AggregateFinal {
160158
self.before_group_by_schema.clone(),
161159
&self.group_by,
162160
&self.agg_funcs,
163-
enable_experimental_aggregate_hashtable,
164161
is_cluster_aggregate,
165162
max_spill_io_requests as usize,
166163
enable_experiment_aggregate,
@@ -374,9 +371,6 @@ impl PhysicalPlanBuilder {
374371
group_by_shuffle_mode = "before_merge".to_string();
375372
}
376373

377-
let enable_experimental_aggregate_hashtable =
378-
settings.get_enable_experimental_aggregate_hashtable()?;
379-
380374
if let Some(grouping_sets) = agg.grouping_sets.as_ref() {
381375
// ignore `_grouping_id`.
382376
// If the aggregation function argument if a group item,
@@ -423,7 +417,6 @@ impl PhysicalPlanBuilder {
423417
AggregatePartial {
424418
input: expand,
425419
agg_funcs,
426-
enable_experimental_aggregate_hashtable,
427420
group_by_display,
428421
group_by: group_items,
429422
stat_info: Some(stat_info),
@@ -436,7 +429,6 @@ impl PhysicalPlanBuilder {
436429
agg_funcs,
437430
rank_limit,
438431
group_by_display,
439-
enable_experimental_aggregate_hashtable,
440432
group_by: group_items,
441433
stat_info: Some(stat_info),
442434
meta: PhysicalPlanMeta::new("AggregatePartial"),
@@ -477,7 +469,6 @@ impl PhysicalPlanBuilder {
477469
PhysicalPlan::new(AggregatePartial {
478470
agg_funcs,
479471
group_by_display,
480-
enable_experimental_aggregate_hashtable,
481472
rank_limit: None,
482473
group_by: group_items,
483474
input: PhysicalPlan::new(expand),
@@ -488,7 +479,6 @@ impl PhysicalPlanBuilder {
488479
PhysicalPlan::new(AggregatePartial {
489480
input,
490481
agg_funcs,
491-
enable_experimental_aggregate_hashtable,
492482
group_by_display,
493483
group_by: group_items,
494484
stat_info: Some(stat_info),

src/query/service/src/physical_plans/physical_aggregate_partial.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ pub struct AggregatePartial {
5959
pub input: PhysicalPlan,
6060
pub group_by: Vec<IndexType>,
6161
pub agg_funcs: Vec<AggregateFunctionDesc>,
62-
pub enable_experimental_aggregate_hashtable: bool,
6362
pub group_by_display: Vec<String>,
6463

6564
// Order by keys if keys are subset of group by key, then we can use rank to filter data in previous
@@ -163,7 +162,6 @@ impl IPhysicalPlan for AggregatePartial {
163162
meta: self.meta.clone(),
164163
group_by: self.group_by.clone(),
165164
agg_funcs: self.agg_funcs.clone(),
166-
enable_experimental_aggregate_hashtable: self.enable_experimental_aggregate_hashtable,
167165
group_by_display: self.group_by_display.clone(),
168166
rank_limit: self.rank_limit.clone(),
169167
stat_info: self.stat_info.clone(),
@@ -178,17 +176,12 @@ impl IPhysicalPlan for AggregatePartial {
178176
let max_threads = builder.settings.get_max_threads()?;
179177
let max_spill_io_requests = builder.settings.get_max_spill_io_requests()?;
180178

181-
let enable_experimental_aggregate_hashtable = builder
182-
.settings
183-
.get_enable_experimental_aggregate_hashtable()?;
184-
185179
let enable_experiment_aggregate = builder.settings.get_enable_experiment_aggregate()?;
186180

187181
let params = PipelineBuilder::build_aggregator_params(
188182
self.input.output_schema()?,
189183
&self.group_by,
190184
&self.agg_funcs,
191-
enable_experimental_aggregate_hashtable,
192185
builder.is_exchange_parent(),
193186
max_spill_io_requests as usize,
194187
enable_experiment_aggregate,

src/query/service/src/pipelines/builders/builder_aggregate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ impl PipelineBuilder {
3434
input_schema: DataSchemaRef,
3535
group_by: &[IndexType],
3636
agg_funcs: &[AggregateFunctionDesc],
37-
enable_experimental_aggregate_hashtable: bool,
3837
cluster_aggregator: bool,
3938
max_spill_io_requests: usize,
4039
enable_experiment_aggregate: bool,
@@ -130,7 +129,6 @@ impl PipelineBuilder {
130129
&group_by,
131130
&aggs,
132131
&agg_args,
133-
enable_experimental_aggregate_hashtable,
134132
cluster_aggregator,
135133
max_spill_io_requests,
136134
enable_experiment_aggregate,

src/query/service/src/pipelines/processors/transforms/aggregator/aggregator_params.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ pub struct AggregatorParams {
3737
// If there is no aggregate function, layout is None
3838
pub states_layout: Option<StatesLayout>,
3939

40-
pub enable_experimental_aggregate_hashtable: bool,
4140
pub cluster_aggregator: bool,
4241
pub max_spill_io_requests: usize,
4342

@@ -55,7 +54,6 @@ impl AggregatorParams {
5554
group_columns: &[usize],
5655
agg_funcs: &[AggregateFunctionRef],
5756
agg_args: &[Vec<usize>],
58-
enable_experimental_aggregate_hashtable: bool,
5957
cluster_aggregator: bool,
6058
max_spill_io_requests: usize,
6159
enable_experiment_aggregate: bool,
@@ -75,7 +73,6 @@ impl AggregatorParams {
7573
aggregate_functions: agg_funcs.to_vec(),
7674
aggregate_functions_arguments: agg_args.to_vec(),
7775
states_layout,
78-
enable_experimental_aggregate_hashtable,
7976
cluster_aggregator,
8077
max_block_rows,
8178
max_block_bytes,

src/query/settings/src/settings_default.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,6 @@ impl DefaultSettings {
327327
scope: SettingScope::Both,
328328
range: Some(SettingRange::String(all_timezones)),
329329
}),
330-
("group_by_two_level_threshold", DefaultSettingValue {
331-
value: UserSettingValue::UInt64(20000),
332-
desc: "Sets the number of keys in a GROUP BY operation that will trigger a two-level aggregation.",
333-
mode: SettingMode::Both,
334-
scope: SettingScope::Both,
335-
range: Some(SettingRange::Numeric(0..=u64::MAX)),
336-
}),
337330
("max_inlist_to_or", DefaultSettingValue {
338331
value: UserSettingValue::UInt64(3),
339332
desc: "Sets the maximum number of values that can be included in an IN expression to be converted to an OR operator.",
@@ -727,13 +720,6 @@ impl DefaultSettings {
727720
scope: SettingScope::Both,
728721
range: Some(SettingRange::String(vec!["before_partial".into(), "before_merge".into()])),
729722
}),
730-
("efficiently_memory_group_by", DefaultSettingValue {
731-
value: UserSettingValue::UInt64(0),
732-
desc: "Memory is used efficiently, but this may cause performance degradation.",
733-
mode: SettingMode::Both,
734-
scope: SettingScope::Both,
735-
range: Some(SettingRange::Numeric(0..=1)),
736-
}),
737723
("lazy_read_threshold", DefaultSettingValue {
738724
value: UserSettingValue::UInt64(1000),
739725
desc: "Sets the maximum LIMIT in a query to enable lazy read optimization. Setting it to 0 disables the optimization.",
@@ -1005,13 +991,6 @@ impl DefaultSettings {
1005991
scope: SettingScope::Both,
1006992
range: Some(SettingRange::Numeric(0..=1)),
1007993
}),
1008-
("enable_experimental_aggregate_hashtable", DefaultSettingValue {
1009-
value: UserSettingValue::UInt64(1),
1010-
desc: "Enables experimental aggregate hashtable",
1011-
mode: SettingMode::Both,
1012-
scope: SettingScope::Both,
1013-
range: Some(SettingRange::Numeric(0..=1)),
1014-
}),
1015994
("numeric_cast_option", DefaultSettingValue {
1016995
value: UserSettingValue::String("rounding".to_string()),
1017996
desc: "Set numeric cast mode as \"rounding\" or \"truncating\".",

src/query/settings/src/settings_getter_setter.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,6 @@ impl Settings {
305305
self.try_get_string("timezone")
306306
}
307307

308-
// Get group by two level threshold
309-
pub fn get_group_by_two_level_threshold(&self) -> Result<u64> {
310-
self.try_get_u64("group_by_two_level_threshold")
311-
}
312-
313308
pub fn get_max_inlist_to_or(&self) -> Result<u64> {
314309
self.try_get_u64("max_inlist_to_or")
315310
}
@@ -537,14 +532,6 @@ impl Settings {
537532
Ok(self.try_get_u64("grouping_sets_to_union")? == 1)
538533
}
539534

540-
pub fn get_efficiently_memory_group_by(&self) -> Result<bool> {
541-
Ok(self.try_get_u64("efficiently_memory_group_by")? == 1)
542-
}
543-
544-
pub fn get_enable_experimental_aggregate_hashtable(&self) -> Result<bool> {
545-
Ok(self.try_get_u64("enable_experimental_aggregate_hashtable")? == 1)
546-
}
547-
548535
pub fn get_lazy_read_threshold(&self) -> Result<u64> {
549536
self.try_get_u64("lazy_read_threshold")
550537
}

tests/sqllogictests/suites/base/03_common/03_0003_select_group_by.test

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,8 @@ SELECT number, count(*) FROM numbers_mt(10000) group by number order by number l
114114
3 1
115115
4 1
116116

117-
statement ok
118-
set group_by_two_level_threshold=10
119-
120-
query II
121-
SELECT number, count(*) FROM numbers_mt(1000) group by number order by number limit 5
122-
----
123-
0 1
124-
1 1
125-
2 1
126-
3 1
127-
4 1
128-
129-
statement ok
130-
set group_by_two_level_threshold=1000000000
131-
132117
query II
133-
SELECT number, count(*) FROM numbers_mt(1000) group by number order by number limit 5
118+
SELECT number, count(*) FROM numbers_mt(100000) group by number order by number limit 5
134119
----
135120
0 1
136121
1 1

tests/sqllogictests/suites/base/03_common/03_0003_select_group_by_old.test

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/sqllogictests/suites/base/03_common/03_0036_two_level_efficiently_memory_aggregator.test

Lines changed: 0 additions & 31 deletions
This file was deleted.

tests/sqllogictests/suites/base/03_common/03_0037_efficiently_memory_group_by.test

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)