Skip to content

Commit 64d74db

Browse files
committed
fix
1 parent f303632 commit 64d74db

File tree

7 files changed

+5
-24
lines changed

7 files changed

+5
-24
lines changed

src/query/expression/src/aggregate/aggregate_function.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,4 @@ pub trait AggregateFunction: fmt::Display + Sync + Send {
166166
fn get_if_condition(&self, _columns: ProjectedBlock) -> Option<Bitmap> {
167167
None
168168
}
169-
170-
// some features
171-
fn convert_const_to_full(&self) -> bool {
172-
true
173-
}
174169
}

src/query/expression/src/aggregate/payload.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,13 @@ impl Payload {
421421
true
422422
}
423423

424-
pub fn empty_block(&self, fake_rows: Option<usize>) -> DataBlock {
425-
let fake_rows = fake_rows.unwrap_or(0);
424+
pub fn empty_block(&self, fake_rows: usize) -> DataBlock {
426425
assert_eq!(self.aggrs.is_empty(), self.states_layout.is_none());
427426
let entries = self
428427
.states_layout
429428
.as_ref()
430429
.iter()
431-
.flat_map(|x| x.serialize_type.iter())
430+
.flat_map(|layout| layout.serialize_type.iter())
432431
.map(|serde_type| {
433432
ColumnBuilder::repeat_default(&serde_type.data_type(), fake_rows)
434433
.build()

src/query/expression/src/aggregate/payload_flush.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Payload {
125125
}
126126

127127
if blocks.is_empty() {
128-
return Ok(self.empty_block(None));
128+
return Ok(self.empty_block(0));
129129
}
130130
DataBlock::concat(&blocks)
131131
}
@@ -172,7 +172,7 @@ impl Payload {
172172
}
173173

174174
if blocks.is_empty() {
175-
return Ok(self.empty_block(None));
175+
return Ok(self.empty_block(0));
176176
}
177177

178178
DataBlock::concat(&blocks)

src/query/functions/src/aggregates/adaptors/aggregate_null_adaptor.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ impl<const NULLABLE_RESULT: bool> AggregateFunction for AggregateNullUnaryAdapto
207207
self.0.drop_state(place);
208208
}
209209

210-
fn convert_const_to_full(&self) -> bool {
211-
self.0.nested.convert_const_to_full()
212-
}
213-
214210
fn get_if_condition(&self, columns: ProjectedBlock) -> Option<Bitmap> {
215211
self.0.nested.get_if_condition(columns)
216212
}
@@ -332,10 +328,6 @@ impl<const NULLABLE_RESULT: bool> AggregateFunction
332328
self.0.drop_state(place);
333329
}
334330

335-
fn convert_const_to_full(&self) -> bool {
336-
self.0.nested.convert_const_to_full()
337-
}
338-
339331
fn get_if_condition(&self, columns: ProjectedBlock) -> Option<Bitmap> {
340332
self.0.nested.get_if_condition(columns)
341333
}

src/query/functions/src/aggregates/adaptors/aggregate_ornull_adaptor.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,6 @@ impl AggregateFunction for AggregateFunctionOrNullAdaptor {
237237
unsafe fn drop_state(&self, place: AggrState) {
238238
self.inner.drop_state(place.remove_last_loc())
239239
}
240-
241-
fn convert_const_to_full(&self) -> bool {
242-
self.inner.convert_const_to_full()
243-
}
244240
}
245241

246242
impl fmt::Display for AggregateFunctionOrNullAdaptor {

src/query/service/src/pipelines/executor/query_pipeline_executor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use databend_common_pipeline_core::FinishedCallbackChain;
3333
use databend_common_pipeline_core::LockGuard;
3434
use databend_common_pipeline_core::Pipeline;
3535
use databend_common_pipeline_core::PlanProfile;
36-
use fastrace::func_path;
3736
use fastrace::prelude::*;
3837
use futures::future::select;
3938
use futures_util::future::Either;

src/query/service/src/pipelines/processors/transforms/aggregator/serde/transform_aggregate_serializer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl SerializeAggregateStream {
224224
// always return at least one block
225225
if self.nums == 0 {
226226
self.nums += 1;
227-
let block = p.payload.empty_block(Some(1));
227+
let block = p.payload.empty_block(1);
228228
Ok(Some(block.add_meta(Some(
229229
AggregateSerdeMeta::create_agg_payload(
230230
p.bucket,

0 commit comments

Comments
 (0)