Jackie-Jiang commented on a change in pull request #6285: URL: https://github.com/apache/incubator-pinot/pull/6285#discussion_r533656258
########## File path: pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/DistinctAggregationFunction.java ########## @@ -18,31 +18,25 @@ */ package org.apache.pinot.core.query.aggregation.function; -import com.google.common.base.Preconditions; -import java.util.Arrays; import java.util.List; import java.util.Map; import javax.annotation.Nullable; import org.apache.pinot.common.function.AggregationFunctionType; -import org.apache.pinot.common.utils.DataSchema; import org.apache.pinot.common.utils.DataSchema.ColumnDataType; import org.apache.pinot.core.common.BlockValSet; -import org.apache.pinot.core.common.RowBasedBlockValueFetcher; -import org.apache.pinot.core.data.table.Record; import org.apache.pinot.core.query.aggregation.AggregationResultHolder; -import org.apache.pinot.core.query.aggregation.ObjectAggregationResultHolder; -import org.apache.pinot.core.query.aggregation.function.customobject.DistinctTable; import org.apache.pinot.core.query.aggregation.groupby.GroupByResultHolder; import org.apache.pinot.core.query.request.context.ExpressionContext; import org.apache.pinot.core.query.request.context.OrderByExpressionContext; /** - * The DISTINCT clause in SQL is executed as the DISTINCT aggregation function. - * TODO: Support group-by + * The DISTINCT clause in SQL is represented as the DISTINCT aggregation function. Currently it is only used to wrap the + * information for the distinct queries. + * TODO: Use a separate way to represent DISTINCT instead of aggregation. */ @SuppressWarnings("rawtypes") -public class DistinctAggregationFunction implements AggregationFunction<DistinctTable, Comparable> { +public class DistinctAggregationFunction implements AggregationFunction<Object, Comparable> { Review comment: Yes, currently `DISTINCT` keyword is not supported in the `PinotQuery`, so we use aggregation to pass the arguments. We keep it the same way for backward-compatibility, and I have added a TODO to clean it up later. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org