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

Julian Hyde commented on PHOENIX-1706:
--------------------------------------

I have a basic implementation in 
https://github.com/julianhyde/phoenix/tree/1706-ddl-skeleton.

It requires the fix for CALCITE-691 (currently only in 
https://github.com/julianhyde/phoenix/tree/1706-ddl-skeleton) and hence 
calcite-1.3.0-incubating-SNAPSHOT.

The modified parser can parse a COMMIT statement to create a SqlCommit parse 
tree node (a new class in package org.apache.phoenix.calcite.parse). If you 
don't want a COMMIT, feel free to adapt the process for other kinds of DDL.

It currently throws an UnsupportedOperationException during validation, and 
there is no way to execute. We should discuss how to extend the validator (or 
create a separate DDL validator) and how to execute.

> Create skeleton for parsing DDL
> -------------------------------
>
>                 Key: PHOENIX-1706
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1706
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Julian Hyde
>
> Phoenix would like to leverage the Calcite parser, so would like to have the 
> ability to parse the following DDL statements. The current work for this is 
> occurring in the calcite branch.
> CREATE TABLE: http://phoenix.apache.org/language/index.html#create_table
> CREATE VIEW: http://phoenix.apache.org/language/index.html#create_view
> CREATE INDEX: http://phoenix.apache.org/language/index.html#create_index
> CREATE SEQUENCE: http://phoenix.apache.org/language/index.html#create_sequence
> ALTER TABLE/VIEW: http://phoenix.apache.org/language/index.html#alter
> ALTER INDEX: http://phoenix.apache.org/language/index.html#alter_index
> DROP TABLE: http://phoenix.apache.org/language/index.html#drop_table
> DROP VIEW: http://phoenix.apache.org/language/index.html#drop_view
> DROP INDEX: http://phoenix.apache.org/language/index.html#drop_index
> DROP SEQUENCE: http://phoenix.apache.org/language/index.html#drop_sequence
> UPDATE STATISTICS: 
> http://phoenix.apache.org/language/index.html#update_statistics
> TRACE ON/OFF [WITH SAMPLING <decimal between 0.0 and 1.0>] 



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

Reply via email to