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

   ### Describe the bug
   
   `Expr::is_volatile_node` only checks `Expr::ScalarFunction`. `AggregateUDF`, 
`WindowUDF` and `HigherOrderUDF` declare a volatility too, but 
`Expr::is_volatile` never sees it, so optimizer rules that rely on it (CSE, 
filter pushdown, the simplifier, …) treat volatile user-defined functions of 
those kinds as deterministic. The physical layer already checks HOF volatility 
in `HigherOrderFunctionExpr::is_volatile_node`; the logical `Expr` is the 
outlier.
   
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   All built-in functions in these categories are `Immutable`, so only 
user-defined functions are affected.


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