[ 
https://issues.apache.org/jira/browse/CALCITE-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15003396#comment-15003396
 ] 

Julian Hyde commented on CALCITE-707:
-------------------------------------

I think it's really likely that Project X and Project Y will have different 
syntax for CREATE TABLE. If we put it into core we'd spend ages figuring out 
how projects can override CREATE TABLE without overriding DROP TABLE and CREATE 
INDEX. And I haven't yet heard anyone volunteer to contribute CREATE TABLE to 
calcite.

> Built-in support for simple DDL statements
> ------------------------------------------
>
>                 Key: CALCITE-707
>                 URL: https://issues.apache.org/jira/browse/CALCITE-707
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> I would like Calcite to support simple DDL.
> DDL (and other commands such as KILL STATEMENT) make it possible to do a wide 
> range of operations over a REST or JDBC interface. We can't expect everything 
> do be done locally, using Java method calls.
> I expect that projects that use Calcite will define their own DDL. (In fact 
> Drill and Phoenix already do; see PHOENIX-1706.) Those projects are very 
> likely to have their own variations on CREATE TABLE etc. so they will want to 
> extend the parser. What I did in Phoenix (which was in turn adapted from 
> Drill) is a model that other projects can follow.
> But the base Calcite project should have CREATE TABLE, DROP TABLE, CREATE 
> SCHEMA, DROP SCHEMA, CREATE [ OR REPLACE ] VIEW etc.  There will be an AST 
> (extending SqlNode) for each of these commands, and a command-handler. Each 
> project that uses Calcite could extend those
> ASTs, but it would be fine if it built its own AST and command-handler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to