Skip to content

Commit 9b7a8d3

Browse files
committed
chore: Minor cleanups
1 parent 6d8f9dd commit 9b7a8d3

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

datafusion/src/cube_ext/joinagg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ impl ExecutionPlan for CrossJoinAggExec {
259259
accumulators = hash_aggregate::group_aggregate_batch(
260260
&AggregateMode::Full,
261261
&group_expr,
262-
&self.agg_expr,
263262
joined,
264263
std::mem::take(&mut accumulators),
265264
&aggs,

datafusion/src/physical_plan/distinct_expressions.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@ use arrow::datatypes::{DataType, Field};
2727

2828
use crate::error::{DataFusionError, Result};
2929
use crate::physical_plan::group_scalar::GroupByScalar;
30+
use crate::physical_plan::groups_accumulator::GroupsAccumulator;
31+
use crate::physical_plan::groups_accumulator_flat_adapter::GroupsAccumulatorFlatAdapter;
3032
use crate::physical_plan::{Accumulator, AggregateExpr, PhysicalExpr};
3133
use crate::scalar::ScalarValue;
3234
use itertools::Itertools;
3335
use smallvec::SmallVec;
3436
use std::collections::hash_map::RandomState;
3537
use std::collections::HashSet;
3638

37-
use super::groups_accumulator::GroupsAccumulator;
38-
use super::groups_accumulator_flat_adapter::GroupsAccumulatorFlatAdapter;
39-
4039
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
4140
struct DistinctScalarValues(Vec<GroupByScalar>);
4241

datafusion/src/physical_plan/expressions/min_max.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ impl AggregateExpr for Max {
105105
return true;
106106
}
107107

108-
/// the groups accumulator used to accumulate values from the expression. If this returns None,
109-
/// create_accumulator must be used.
110108
fn create_groups_accumulator(
111109
&self,
112110
) -> arrow::error::Result<Option<Box<dyn GroupsAccumulator>>> {

datafusion/src/physical_plan/hash_aggregate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,16 +408,17 @@ pin_project! {
408408
}
409409
}
410410

411-
// TODO: _aggr_expr is currently unused; it's kept for perhaps, debugging usage, but probably just remove it.
412411
pub(crate) fn group_aggregate_batch(
413412
mode: &AggregateMode,
414413
group_expr: &[Arc<dyn PhysicalExpr>],
415-
_aggr_expr: &[Arc<dyn AggregateExpr>],
416414
batch: RecordBatch,
417415
mut accumulation_state: AccumulationState,
418416
aggregate_expressions: &[Vec<Arc<dyn PhysicalExpr>>],
419417
skip_row: impl Fn(&RecordBatch, /*row_index*/ usize) -> bool,
420418
) -> Result<AccumulationState> {
419+
// Note: There is some parallel array &[Arc<dyn AggregateExpr>] that simply isn't passed to this
420+
// function, but which exists and might be useful.
421+
421422
// evaluate the grouping expressions
422423
let group_values = evaluate(group_expr, &batch)?;
423424

@@ -813,7 +814,6 @@ async fn compute_grouped_hash_aggregate(
813814
accumulators = group_aggregate_batch(
814815
&mode,
815816
&group_expr,
816-
&aggr_expr,
817817
batch,
818818
accumulators,
819819
&aggregate_expressions,

0 commit comments

Comments
 (0)