[ https://issues.apache.org/jira/browse/PHOENIX-2228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187819#comment-15187819 ]
Rajeshbabu Chintaguntla commented on PHOENIX-2228: -------------------------------------------------- [~kdmu] Here are some detailed steps need to be done for create table. Same thing can be done for Create sequence also. 1) Similar to create view we should define Sql create table operator. The operator constructor accepts table name, column defintions, table properties, family properties, constraints, split keys etc. For all of these we need sql nodes ex. SqlColumnDef which has column name, data type and so on.. 2) We need to write SqlCreateTable method in SqlParserImpl there we need to define how create table to be parsed and need to collect all the sql nodes for table details like column definitions and so on.. We can compare it with SqlSelect how it's implemented and we can follow it. {noformat} /** * Parses a leaf SELECT expression without ORDER BY. */ final public SqlSelect SqlSelect() throws ParseException { {noformat} 3) We need to implement add switch case to executeDdl PhoenixParserImpl, here we should be able to get PhoenixSchema from the context and create CreateTableStatement, CreateTableCompiler and run compile on it. Here we should be able to create phoenix statement and all required things because we have phoenix connection accessible here. > Support CREATE TABLE in Phoenix-Calcite Integration > --------------------------------------------------- > > Key: PHOENIX-2228 > URL: https://issues.apache.org/jira/browse/PHOENIX-2228 > Project: Phoenix > Issue Type: Sub-task > Reporter: Maryann Xue > Assignee: Rajeshbabu Chintaguntla > Labels: calcite > -- This message was sent by Atlassian JIRA (v6.3.4#6332)