Mihai Budiu created CALCITE-6607: ------------------------------------ Summary: RexExecutor can throw during evaluation Key: CALCITE-6607 URL: https://issues.apache.org/jira/browse/CALCITE-6607 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.37.0 Reporter: Mihai Budiu Assignee: Mihai Budiu
This is related to [CALCITE-1439] [CALCITE-6168] The RexExecutor can be invoked for simplifying constant expressions. It then compiles these expressions into a Java program, which is then evaluated to get the actual result. Exceptions during compilation are caught, leaving the expression unchanged. Exceptions during evaluation are actually not caught. This was uncovered while testing casts from variant types to user-defined types. I am not sure how to make a simple reproduction for such a case. The fix is easy, and very similar to the previous two issues: just catch exceptions during evaluation and leave the expression unchanged. -- This message was sent by Atlassian Jira (v8.20.10#820010)