◆ DistinctAggregateOptimizer()
| duckdb::DistinctAggregateOptimizer::DistinctAggregateOptimizer |
( |
ExpressionRewriter & | rewriter | ) |
|
|
explicit |
320691 root = make_uniq<ExpressionMatcher>();
320692 root->expr_class = ExpressionClass::BOUND_AGGREGATE;
320693}
ExpressionRewriter & rewriter
The expression rewriter this rule belongs to.
Definition duckdb.cpp:69564
unique_ptr< ExpressionMatcher > root
The expression matcher of the rule.
Definition duckdb.cpp:69566
◆ Apply() [1/2]
320696 {
320697 if (!aggr.IsDistinct()) {
320698
320699 return nullptr;
320700 }
320701 if (aggr.function.GetDistinctDependent() == AggregateDistinctDependent::NOT_DISTINCT_DEPENDENT) {
320702
320703 aggr.aggr_type = AggregateType::NON_DISTINCT;
320704 changes_made = true;
320705 return nullptr;
320706 }
320707 return nullptr;
320708}
◆ Apply() [2/2]
Implements duckdb::Rule.
320711 {
320712 auto &aggr = bindings[0].get().Cast<BoundAggregateExpression>();
320713 return Apply(
rewriter.context, aggr, changes_made);
320714}
The documentation for this class was generated from the following file: