silundong commented on code in PR #4488:
URL: https://github.com/apache/calcite/pull/4488#discussion_r2250354965
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -88,6 +89,9 @@ public class RexSimplify {
private static final Strong STRONG = new Strong();
+ private static final List<SqlOperator> IDEMOTENT_UNARY_FUNCTIONS =
+ Arrays.asList(SqlStdOperatorTable.UPPER, SqlStdOperatorTable.LOWER,
SqlStdOperatorTable.ABS);
Review Comment:
`ImmutableList` is better
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -397,6 +403,22 @@ RexNode isFalse(RexNode e) {
: rexBuilder.makeCall(SqlStdOperatorTable.IS_FALSE, e);
}
+ /**
+ * Runs simplification unary function by eliminating idempotent.
+ */
+ private RexCall simplifUnaryFunction(RexCall rexCall) {
Review Comment:
I think `simplifyIdempotentUnaryFunction` is more appropriate.
--
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]