Hello,

I would like to have some runtime errors, such as division by 0, report to the 
user the source code position of the original operation within the SQL query. 
However, I could not find any examples that do that, and I am not sure how this 
information can be propagated through the Rel representation. I understand that 
the CalciteContextException is designed for this purpose, but I couldn't 
discover any instance where this is thrown at runtime (I found instances thrown 
only at compilation time).

I would very much appreciate if someone could point me in the right direction. 
A test that throws at runtime and prints source position would be great.

If there isn't such information in Rel nodes, perhaps it should be added in 
some of them? (I wrote in a blog post recently that such information exists in 
RexCall nodes, but it seems that I was wrong.)

Thank you,
Mihai

Reply via email to