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

RexCall should carry source position information for runtime error reporting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.35.0
    • 1.38.0
    • core

    Description

      Currently runtime errors, such as division by zero, cannot report the position in the original source code where the original operator was. RexNode does not carry such information. By adding the required information in RexNode we can report much better runtime errors to users.

      Here is an additional comment from jhyde on the dev mailing list:

      The RexCall to such throwable functions would have a hidden ‘pos’ parameter. The parameter should be populated at Sql-to-rel time, and if it is not present, SqlOperator.validareRexOperands should throw. Associating the position with the particular function call seems to me much more robust than associating it with the RelNode that contains the call.
       

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: