Yu Xu created CALCITE-7122:
------------------------------

             Summary: Eliminate nested calls for idempotent unary functions 
upper/lower/abs
                 Key: CALCITE-7122
                 URL: https://issues.apache.org/jira/browse/CALCITE-7122
             Project: Calcite
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.40.0
            Reporter: Yu Xu
            Assignee: Yu Xu
             Fix For: 1.41.0


Unary functions like upper/lower/abs are idempotent( f(f(...f(x)))—> f(x), but 
currently had not eliminate idempotency for them.

eg:

 
{code:java}
SELECT LOWER(LOWER('AAA')) {code}
would convert to:

 
{code:java}
SELECT LOWER(LOWER('AAA')){code}
should would better simplify to

 
{code:java}
SELECT LOWER('AAA') {code}
 

 

Because the idempotency elimination of unary functions is relatively simple, we 
can design a mechanism to simplify.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to