xuzifu666 commented on PR #4400:
URL: https://github.com/apache/calcite/pull/4400#issuecomment-2921480449

   I made the following changes:
   1. Deleted the test class in RelToSqlConverterTest, and moved the 
optimization rule test to RexImplicationCheckerTest, including positive and 
negative tests;
   2. Changed the title of PR and issue to: "Eliminate nested TRIM calls, 
exploiting the fact that TRIM id idempotent"
   3. Added comments to the test in planner.iq
   4. Implemented the constant interceptor function of trim function in 
RexInterpreter
   
   In addition, I considered the general mechanism, which can be roughly 
divided into two categories:
   1. Similar to Trim function, whether idempotency can be eliminated depends 
on whether multiple internal and external parameters are consistent. In this 
case, it is not easy to unify the rules;
   2. Idempotency elimination does not need to depend on parameter conditions, 
similar to upper/lower, which can directly remove idempotency. This function 
rule is easy to unify.
   
   My plan is to deal with the problem of Trim function in this PR, and then I 
will open a new issue and PR to unify the rules to deal with the second case. 
@julianhyde @mihaibudiu 


-- 
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]

Reply via email to