You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/12/05 22:28:19 UTC
[GitHub] [incubator-pinot] mayankshriv commented on a change in pull request #6323: Decimal percentile support.
mayankshriv commented on a change in pull request #6323:
URL: https://github.com/apache/incubator-pinot/pull/6323#discussion_r536904706
##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/PercentileTDigestMVAggregationFunction.java
##########
@@ -33,19 +33,27 @@ public PercentileTDigestMVAggregationFunction(ExpressionContext expression, int
super(expression, percentile);
}
+ public PercentileTDigestMVAggregationFunction(ExpressionContext expression, double percentile) {
+ super(expression, percentile);
+ }
+
@Override
public AggregationFunctionType getType() {
return AggregationFunctionType.PERCENTILETDIGESTMV;
}
@Override
public String getColumnName() {
- return AggregationFunctionType.PERCENTILETDIGEST.getName() + _percentile + "MV_" + _expression;
+ return _version == 0 ? AggregationFunctionType.PERCENTILETDIGEST.getName() + (int) _percentile + "MV_" + _expression
+ : AggregationFunctionType.PERCENTILETDIGEST.getName() + _percentile + "MV_" + _expression;
}
@Override
public String getResultColumnName() {
- return AggregationFunctionType.PERCENTILETDIGEST.getName().toLowerCase() + _percentile + "mv(" + _expression + ")";
+ return _version == 0 ? AggregationFunctionType.PERCENTILETDIGEST.getName().toLowerCase() + (int) _percentile + "mv("
+ + _expression + ")"
+ : AggregationFunctionType.PERCENTILETDIGEST.getName().toLowerCase() + "mv(" + _expression + ", " + _percentile
Review comment:
@Jackie-Jiang Thoughts on what should we return as column name for the new way of calling `percentile(column, <double>)`?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org