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.
Describe the bug
Expr::is_volatile_nodeonly checksExpr::ScalarFunction.AggregateUDF,WindowUDFandHigherOrderUDFdeclare a volatility too, butExpr::is_volatilenever 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 inHigherOrderFunctionExpr::is_volatile_node; the logicalExpris 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.