yuqi1129 commented on a change in pull request #1057:
URL: https://github.com/apache/calcite/pull/1057#discussion_r458504183
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -2194,7 +2193,14 @@ 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) {
+ e = Expressions.call(argValue, "negate");
Review comment:
OK
----------------------------------------------------------------
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]