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/06 20:51:57 UTC
[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6323: Decimal percentile support.
Jackie-Jiang commented on a change in pull request #6323:
URL: https://github.com/apache/incubator-pinot/pull/6323#discussion_r537120753
##########
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:
The current way looks good (returning `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