DonnyZone commented on a change in pull request #1057:
URL: https://github.com/apache/calcite/pull/1057#discussion_r458501560



##########
File path: 
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -2194,7 +2197,15 @@ private Expression maybeBox(Expression expression) {
     @Override Expression implementSafe(RexToLixTranslator translator,
         RexCall call, List<Expression> argValueList) {
       final Expression argValue = argValueList.get(0);
-      final UnaryExpression e = Expressions.makeUnary(expressionType, 
argValue);
+
+      final Expression e;
+      if (expressionType == ExpressionType.Negate && argValue.type == 
BigDecimal.class

Review comment:
       ```
   if (backupMethodName != null) {
     // add some comments here
     if (expressionType == ExpressionType.Negate && argValue.type == 
BigDecimal.class) {
       e = Expressions.call(argValue, backupMethodName);
     }
   } else {
     e = Expressions.makeUnary(expressionType, argValue);
   }
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to