Hi, all.

I'm using Apache Calcite with SQL.

I'm trying to execute an SQL query like

SELECT * FROM table WHERE some_field = 1 AND other_field = 5)

where table is:

       some_field | other field
       ------------------------
row 1:      1      |     2
row 2:      1      |     3


This query will return empty results.

I want to tell the user why the query returned empty results, row by row.
Then, I want to be able to access the query plan and transverse it to the
node that produced the empty results (other_field = 5) and I want to have
in context the current value of other_field (2) so I can print messages
like:

Row 1 failed because `other_field` was `2` and `5` was expected
Row 2 failed because `other_field` was `3` and `5` was expected

I'm not sure which Calcite classes should I use to achieve that, any advice
/ example?

Thanks in advance!

Reply via email to