Jefffrey opened a new issue, #18108:
URL: https://github.com/apache/datafusion/issues/18108

   ### Is your feature request related to a problem or challenge?
   
   #17988 introduced `percentile_cont()`. If the specified percentile is 0 or 
1, we could rewrite the function to use min/max instead which would be 
equivalent but with lower memory usage (`percentile_cont()` by default buffers 
entire input).
   
   ### Describe the solution you'd like
   
   Implement `simplify()` for `percentile_cont`, based on if fraction is a 
provided literal that is 0 or 1, rewriting to min/max.
   
   Things to consider:
   
   - Consider sort order (percentile of 0 ascending = min, but percentile of 0 
descending = max)
   - Ensure return types match
   
   See this comment for reference: 
https://github.com/apache/datafusion/pull/17988#discussion_r2429329576
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to