fx19880617 commented on a change in pull request #5564:
URL: https://github.com/apache/incubator-pinot/pull/5564#discussion_r440508625
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/DistinctCountHLLAggregationFunction.java
##########
@@ -35,9 +36,20 @@
public class DistinctCountHLLAggregationFunction extends
BaseSingleInputAggregationFunction<HyperLogLog, Long> {
public static final int DEFAULT_LOG2M = 8;
+ protected final int _log2M;
- public DistinctCountHLLAggregationFunction(String column) {
- super(column);
+ public DistinctCountHLLAggregationFunction(List<String> arguments) {
+ super(arguments.get(0));
+ int numExpressions = arguments.size();
+ // This function expects 1 or 2 arguments.
+ Preconditions
+ .checkArgument(numExpressions <= 2 && numExpressions >= 1,
"DistinctCountHLL expects 1 or 2 arguments, got: ",
+ numExpressions);
+ if (arguments.size() == 2) {
+ _log2M = Integer.valueOf(arguments.get(1).replace("'", ""));
Review comment:
Added comments.
Currently `PinotQuery2BrokerRequestConverter` enforces single quoted
non-string literal in `ParserUtils.standardizeExpression(...)`.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]