Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Sep 15, 2023
1 parent 4b0cb53 commit d973896
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/optimizer/logical_optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ static CONVERT_DISTINCT_AGG_FOR_STREAM: LazyLock<OptimizationStage> = LazyLock::
"Convert Distinct Aggregation",
vec![
UnionToDistinctRule::create(),
DistinctAggRule::create(true),
AggGroupBySimplifyRule::create(),
DistinctAggRule::create(true),
AggGroupBySimplifyRule::create(),
],
ApplyOrder::TopDown,
)
Expand Down
9 changes: 3 additions & 6 deletions src/frontend/src/optimizer/rule/agg_group_by_simplify_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

use risingwave_common::util::sort_util::{ColumnOrder, OrderType};
use risingwave_expr::agg::AggKind;
use crate::expr::InputRef;
use crate::optimizer::plan_node::generic::{Agg, GenericPlanRef};

use super::super::plan_node::*;
use super::{BoxedRule, Rule};
use crate::expr::InputRef;
use crate::optimizer::plan_node::generic::{Agg, GenericPlanRef};
use crate::utils::{Condition, IndexSet};

/// Use functional dependencies to simplify aggregation's group by
Expand Down Expand Up @@ -78,10 +78,7 @@ impl Rule for AggGroupBySimplifyRule {
}
let new_agg = Agg::new(new_agg_calls, new_group_key, agg.input());

Some(LogicalProject::with_out_col_idx(
new_agg.into(),
out_fields.into_iter(),
).into())
Some(LogicalProject::with_out_col_idx(new_agg.into(), out_fields.into_iter()).into())
} else {
None
}
Expand Down

0 comments on commit d973896

Please sign in to comment.