Get the relational algebra generated by Apache Calcite

322 Views Asked by At

I'm trying to build a translator from SQL to some format that I can parse and execute using my code. Is it possible to parse a query through Apache Calcite and get the output in some parseable format, like JSON?

1

There are 1 best solutions below

0
Michael Mior On

When you parse the query, you can just traverse the objects representing the relational algebra which are generated. If you really want to convert to JSON, you can use RelJsonWriter.