You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "xiedeyantu (via GitHub)" <gi...@apache.org> on 2025/08/06 03:04:26 UTC

Re: [PR] [CALCITE-7122] Eliminate nested calls for idempotent unary functions UPPER/LOWER/ABS/INITCAP [calcite]

xiedeyantu commented on code in PR #4488:
URL: https://github.com/apache/calcite/pull/4488#discussion_r2255751245


##########
core/src/test/java/org/apache/calcite/test/RexImplicationCheckerTest.java:
##########
@@ -361,6 +366,59 @@ public class RexImplicationCheckerTest {
         hasToString("2014"));
   }
 
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-7122">[CALCITE-7122]
+   * Eliminate nested calls for idempotent unary functions UPPER/LOWER/ABS/INITCAP</a>. */
+  @Test void testSimplifyIdempotentUnaryFunctions() {

Review Comment:
   Can you demonstrate this simplification capability using toSql? For example, if you write select `upper(upper(lower(lower('x'))))` it can be simplified to `upper(lower('x'))`. This kind of test is not very easy to understand.



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org