Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6607

RexExecutor can throw during evaluation

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: