xiedeyantu opened a new pull request, #4577:
URL: https://github.com/apache/calcite/pull/4577

   See: [CALCITE-7122](https://issues.apache.org/jira/browse/CALCITE-7122)
   
   I've implemented a rough draft for this JIRA ticket based on my 
understanding. The actual implementation for idempotent elimination is 
referenced from the original author. The logic I refactored is as follows:
   
   1. Allow functions to provide their own idempotent property, instead of 
maintaining a list of which functions are idempotent (this addresses a point 
I've been emphasizing).
   2. Handle idempotent functions in an appropriate location, avoiding 
scattering the idempotent elimination logic across too many places (another 
point I previously mentioned).
   3. Since the current JIRA describes eliminating unary idempotent functions, 
I suggest temporarily excluding `FLOOR` and `CEIL` from consideration.
   
   I haven't modified the test cases from the original PR #4488 , as I want to 
use them to verify the functional equivalence of the current code. If this 
implementation approach is approved, we can establish more specific 
requirements for test cases in the future.
   
   This is just an idea for your reference.


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