Mihai Budiu created CALCITE-6071:
------------------------------------
Summary: RexNode should carry source position information for
runtime error reporting
Key: CALCITE-6071
URL: https://issues.apache.org/jira/browse/CALCITE-6071
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: 1.35.0
Reporter: Mihai Budiu
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)