Il Ven 15 Mag 2020, 22:26 Julian Hyde <jh...@apache.org> ha scritto: > Currently, there is no DDL in Calcite's "core" module (or its SQL > parser) and the SQL parser in the "server" module adds DDL extensions > for Calcite's object types. > > There is a PR [1][2] to add support for "CREATE TABLE" to Babel, and > it makes "babel" extend the "server" module. In particular, it uses > classes SqlDdlNodes and SqlCreateTable from "server". > > I am uncomfortable with that approach, because "server" does other > things besides parse DDL (it creates a stateful server and handles > RPC). Also, the needs of other DBMSs' DDL might make Calcite's DDL > classes more complicated. So, it all seems to be unnecessary coupling. > > The alternative is to copy-paste the DDL classes (currently > SqlDdlNodes, SqlCreateTable and SqlColumnDeclaration) from "babel" > into "server". > > Another alternative would be to move all DDL classes into "core". > > None of the alternatives are great, but I prefer the copy-paste > approach. What do y'all think? >
It would be interesting for HerdDB community to have DDL in core Calcite Enrico > Julian > > [1] https://github.com/apache/calcite/pull/1938 > [2] https://issues.apache.org/jira/browse/CALCITE-3946 >