mihaibudiu commented on code in PR #3782:
URL: https://github.com/apache/calcite/pull/3782#discussion_r1594420157


##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1887,11 +1887,6 @@ public RexNode makeLambdaCall(RexNode expr, 
List<RexLambdaRef> parameters) {
               type.getSqlTypeName());
       return new BigDecimal(((Number) o).longValue());
     case REAL:
-      if (o instanceof BigDecimal) {
-        return o;
-      }
-      return new BigDecimal(((Number) o).doubleValue(), MathContext.DECIMAL32)
-          .stripTrailingZeros();

Review Comment:
   I have fixed this path as well in a subsequent commit.
   Just because Calcite uses Decimal literals to represent FP values doesn't 
mean it has to convert to Decimal when converting to strings.



-- 
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...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to