Yes, this is exactly what Calcite is intended for. So it can validate and execute SQL, you need to tell Calcite about your tables. The simplest way of doing this is to write an adapter. In a simple adapter, your table can return an iterator over its contents, and Calcite provides implementations for all other relational operators. See the Csv adapter: https://github.com/apache/incubator-calcite/blob/master/doc/TUTORIAL.md
More complex adapters provide more operators and rules. Also see the Frameworks class, which allows you to drive the parse - validate - plan steps rather than being driven by a JDBC driver. Julian > On Mar 30, 2015, at 1:46 PM, Bastian Köcher <[email protected]> wrote: > > Hi, > I would like to use Calcite to parse a SQL string and to optimize the created > plan. Is that possible? > So that I get something like an operator plan which can be executed, but I > would pass this plan into my own engine. > > Sorry, if I send this message twice! > > Regards, > Bastian
