alamb commented on issue #7876:
URL: 
https://github.com/apache/arrow-datafusion/issues/7876#issuecomment-1773175964

   > I think we should avoid pushing down non-deterministic predicates.
   
   🤔  I was thinking about this
   
   Would it be ok to push `random()` through a Sort?
   
   It seems like these two queries would be equivalent 
   
   Non-pushdown
   ```
   SELECT * from (SELECT * FROM table ORDER BY time) WHERE random<= 0.2;
   ```
   
   Pushdown
   ```
   SELECT * from (SELECT * FROM table WHERE random() <= 0.2) ORDER BY time
   ```
   
   However, We definitely shouldn't push non deterministic (`volatile`) 
predicates on group keys through the GroupBy for the reasons explained in this 
ticket. Perhaps we can't push such predicate through Group or Join at all 🤔 
   


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