Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.36.0
-
None
-
None
Description
The current behavior of Calcite's RexExecutable constant folding class is to eat all exceptions encountered during reduction. The underlying reason, as far as I understand it, is that even if Calcite can't reduce an expression, maybe the evaluation engine will be able to do it. Fair enough.
But it would be useful to be able to chose to let some exceptions go through. One good example is ArithmeticException errors. They occur on divisions by zero, negative logarithms, etc. and we may want to avoid the downstream evaluation engine to receive such invalid expressions.