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


##########
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 wonder whether will we have similar issue with 
   ```sql
   CAST(FLOAT AS VARCHAR)
   ```
   
https://github.com/apache/calcite/blob/19debd3e90e391bc6ba8250ec81735490b4b0cee/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java#L3511-L3520



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

Reply via email to