Jackie-Jiang commented on code in PR #15377: URL: https://github.com/apache/pinot/pull/15377#discussion_r2029541976
########## pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/RoundDecimalTransformFunction.java: ########## @@ -90,18 +90,30 @@ public double[] transformToDoubleValuesSV(ValueBlock valueBlock) { double[] leftValues = _leftTransformFunction.transformToDoubleValuesSV(valueBlock); if (_fixedScale) { for (int i = 0; i < length; i++) { - _doubleValuesSV[i] = BigDecimal.valueOf(leftValues[i]) - .setScale(_scale, RoundingMode.HALF_UP).doubleValue(); + if (Double.NEGATIVE_INFINITY == leftValues[i]) { Review Comment: (nit) We usually put constant on the right hand side ########## pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/RoundDecimalTransformFunction.java: ########## @@ -90,8 +90,12 @@ public double[] transformToDoubleValuesSV(ValueBlock valueBlock) { double[] leftValues = _leftTransformFunction.transformToDoubleValuesSV(valueBlock); if (_fixedScale) { for (int i = 0; i < length; i++) { - _doubleValuesSV[i] = BigDecimal.valueOf(leftValues[i]) - .setScale(_scale, RoundingMode.HALF_UP).doubleValue(); + if (Double.NEGATIVE_INFINITY == leftValues[i]) { + _doubleValuesSV[i] = Double.NaN; Review Comment: Let's try to match that behavior. We want to handle all special values, including `Inf`, `-Inf`, `NaN` -- 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