abhioncbr commented on issue #10686: URL: https://github.com/apache/pinot/issues/10686#issuecomment-1524278410
Yes. Apache Calcite supports [implicit type conversion](https://calcite.apache.org/docs/reference.html#implicit-type-conversion) between float and double and hence depends on the left operand data type; the right operand is getting cast. So if the LHS is `float` and RHS is `double`; the `cast` is happening from `double -> float`, hence losing precision and resulting in the wrong result. <img width="869" alt="Screen Shot 2023-04-26 at 8 20 24 PM" src="https://user-images.githubusercontent.com/1076944/234729152-a10c523e-235d-4dab-9250-a105b4b220d0.png"> My initial solution approach is to remove/skip this casting function in case of comparison of float/double. What do you think about it? -- 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