61yao commented on code in PR #9389:
URL: https://github.com/apache/pinot/pull/9389#discussion_r978058320


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactory.java:
##########
@@ -101,7 +101,8 @@ public static AggregationFunction 
getAggregationFunction(FunctionContext functio
         } else if (numArguments == 2) {
           // Double arguments percentile (e.g. percentile(foo, 99), 
percentileTDigest(bar, 95), etc.) where the
           // second argument is a decimal number from 0.0 to 100.0.
-          double percentile = 
parsePercentileToDouble(arguments.get(1).getLiteral());
+          // Have to use literal string because we need to cast int to double 
here.
+          double percentile = 
parsePercentileToDouble(arguments.get(1).getLiteralString());

Review Comment:
   implicit cast doesn't work since we can cast integer to double. We should do 
explicit cast.
   but this is not in this PR's scope. I can do this in next PR. Want to keep 
this PR's scope small for easier management.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

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

Reply via email to