You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we do not consider the volatility of expressions in SimplifyExpressions. This leads us to doing rewrites that might change the results and lead to unexpected behavior.
eejbyfeldt
changed the title
SimplifyExpressions should consider not consider volatile expressions equal for rewrites
SimplifyExpressions should not consider volatile expressions equal for rewrites
Oct 23, 2024
Describe the bug
Currently we do not consider the volatility of expressions in SimplifyExpressions. This leads us to doing rewrites that might change the results and lead to unexpected behavior.
To Reproduce
Consider the following query:
The predicate get simplified into
random() = 0
Expected behavior
The predicate should not be simplified so we deduplicat the volatile expressions.
Additional context
We can not exclude volatile expressions outright from simplification as we would still like the simplify for example following predicate
As it does not change the result.
The text was updated successfully, but these errors were encountered: