Skip to content

Commit

Permalink
Convert min/max aggregations to annotate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed May 27, 2022
1 parent 15511fe commit bdbfc01
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@
import io.trino.operator.aggregation.LongSumAggregation;
import io.trino.operator.aggregation.MapAggregationFunction;
import io.trino.operator.aggregation.MapUnionAggregation;
import io.trino.operator.aggregation.MaxAggregationFunction;
import io.trino.operator.aggregation.MaxDataSizeForStats;
import io.trino.operator.aggregation.MaxNAggregationFunction;
import io.trino.operator.aggregation.MergeHyperLogLogAggregation;
import io.trino.operator.aggregation.MergeQuantileDigestFunction;
import io.trino.operator.aggregation.MergeTDigestAggregation;
import io.trino.operator.aggregation.MinAggregationFunction;
import io.trino.operator.aggregation.MinNAggregationFunction;
import io.trino.operator.aggregation.QuantileDigestAggregationFunction.BigintQuantileDigestAggregationFunction;
import io.trino.operator.aggregation.QuantileDigestAggregationFunction.DoubleQuantileDigestAggregationFunction;
Expand Down Expand Up @@ -265,8 +267,6 @@

import static io.trino.operator.aggregation.DecimalAverageAggregation.DECIMAL_AVERAGE_AGGREGATION;
import static io.trino.operator.aggregation.DecimalSumAggregation.DECIMAL_SUM_AGGREGATION;
import static io.trino.operator.aggregation.MaxAggregationFunction.MAX_AGGREGATION;
import static io.trino.operator.aggregation.MinAggregationFunction.MIN_AGGREGATION;
import static io.trino.operator.aggregation.RealAverageAggregation.REAL_AVERAGE_AGGREGATION;
import static io.trino.operator.aggregation.ReduceAggregationFunction.REDUCE_AGG;
import static io.trino.operator.aggregation.arrayagg.ArrayAggregationFunction.ARRAY_AGG;
Expand Down Expand Up @@ -545,7 +545,9 @@ public static FunctionBundle create(FeaturesConfig featuresConfig, TypeOperators
.aggregates(ArbitraryAggregationFunction.class)
.functions(GREATEST, LEAST)
.functions(MAX_BY, MIN_BY, new MaxByNAggregationFunction(blockTypeOperators), new MinByNAggregationFunction(blockTypeOperators))
.functions(MAX_AGGREGATION, MIN_AGGREGATION, new MaxNAggregationFunction(blockTypeOperators), new MinNAggregationFunction(blockTypeOperators))
.aggregates(MinAggregationFunction.class)
.aggregates(MaxAggregationFunction.class)
.functions(new MaxNAggregationFunction(blockTypeOperators), new MinNAggregationFunction(blockTypeOperators))
.aggregates(CountColumn.class)
.functions(JSON_TO_ROW, JSON_STRING_TO_ROW, ROW_TO_ROW_CAST)
.functions(VARCHAR_CONCAT, VARBINARY_CONCAT)
Expand Down

This file was deleted.

Loading

0 comments on commit bdbfc01

Please sign in to comment.