Jackie-Jiang commented on code in PR #11763:
URL: https://github.com/apache/pinot/pull/11763#discussion_r1358926538
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java:
##########
@@ -255,7 +255,8 @@ private static List<Expression>
computeInOperands(List<Object[]> dataContainer,
}
Arrays.sort(arrFloat);
for (int rowIdx = 0; rowIdx < numRows; rowIdx++) {
- expressions.add(RequestUtils.getLiteralExpression(arrFloat[rowIdx]));
+ // TODO: Create float literal when it is supported
+
expressions.add(RequestUtils.getLiteralExpression(Double.parseDouble(Float.toString(arrFloat[rowIdx]))));
Review Comment:
This is needed. We cannot directly cast `float` to `double` because that
will create wrong value (e.g `0.05f` -> `0.05000000074505806`), then cause
wrong result. Added more notes
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]