xuzifu666 commented on code in PR #4488:
URL: https://github.com/apache/calcite/pull/4488#discussion_r2249984344
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -333,7 +337,9 @@ RexNode simplify(RexNode e, RexUnknownAs unknownAs) {
return simplifyM2v((RexCall) e);
default:
if (e.getClass() == RexCall.class) {
- return simplifyGenericNode((RexCall) e);
+ RexCall rexCall = (RexCall) e;
+ rexCall = simplifUnaryFunction(rexCall);
Review Comment:
I was going to do this at first, but it is handled according to SqlKind. The
SqlKind of upper/lower/abs is OTHER_FUNCTION. If I need to add a new SqlKind
and modify the SqlKind of these functions because of this, it doesn’t feel
necessary.
For example, if a new XXX function is added later, the corresponding SqlKind
must also be added. The coupling feels a bit strong, but it is very convenient
to put it directly in the List.
--
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]