I tried out the PIVOT feature added in
CALCITE-3752 and found what I think is a bug where the JDBC adapter will not generate `FILTER (WHERE ...)` expressions from relational expressions.
Initially, I noticed that the SQL that was generated when trying out the pivot featue was missing the filter-where, but even when included directly in the Calcite SQL it's not in the SQL issued by the JDBC adapter.
For example if I try to execute the following with Calcite:
The SQL issued by the adapter will be:
I have a small change here with a test case and a fix: https://github.com/apache/calcite/pull/2204