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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]