Hi,
We have an usecase where we need to just send back optimized query as SQL,
without executing it. So we needed an utility to convert RelNode back to
SQL, and found most of the logic to be in JDBCRel. As we needed it for non
JDBC source, we created an utility to do so:
https://github.com/amoghmargoor/incubator-calcite/blob/NEZ-52/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java

Utility is almost completely copy-pasted from JDBCRels with few fixes from
our side to make it work. If such utility will be useful in Calcite then
let us know, we can plan raising PRs with required UTs.

Regards,
Amogh

Reply via email to