public class SqlCreateTable extends org.apache.calcite.sql.SqlCreate implements ExtendedSqlNode
Modifier and Type | Class and Description |
---|---|
static class |
SqlCreateTable.TableCreationContext
Table creation context.
|
Modifier and Type | Field and Description |
---|---|
static org.apache.calcite.sql.SqlSpecialOperator |
OPERATOR |
Constructor and Description |
---|
SqlCreateTable(org.apache.calcite.sql.parser.SqlParserPos pos,
org.apache.calcite.sql.SqlIdentifier tableName,
org.apache.calcite.sql.SqlNodeList columnList,
org.apache.calcite.sql.SqlNodeList primaryKeyList,
List<org.apache.calcite.sql.SqlNodeList> uniqueKeysList,
org.apache.calcite.sql.SqlNodeList propertyList,
org.apache.calcite.sql.SqlNodeList partitionKeyList,
SqlWatermark watermark,
org.apache.calcite.sql.SqlCharStringLiteral comment) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsComputedColumn() |
String[] |
fullTableName() |
org.apache.calcite.sql.SqlNodeList |
getColumnList() |
String |
getColumnSqlString()
Returns the projection format of the DDL columns(including computed columns).
|
Optional<org.apache.calcite.sql.SqlCharStringLiteral> |
getComment() |
List<org.apache.calcite.sql.SqlNode> |
getOperandList() |
org.apache.calcite.sql.SqlOperator |
getOperator() |
org.apache.calcite.sql.SqlNodeList |
getPartitionKeyList() |
org.apache.calcite.sql.SqlNodeList |
getPrimaryKeyList() |
org.apache.calcite.sql.SqlNodeList |
getPropertyList() |
org.apache.calcite.sql.SqlIdentifier |
getTableName() |
List<org.apache.calcite.sql.SqlNodeList> |
getUniqueKeysList() |
Optional<SqlWatermark> |
getWatermark() |
boolean |
isIfNotExists() |
void |
unparse(org.apache.calcite.sql.SqlWriter writer,
int leftPrec,
int rightPrec) |
void |
validate() |
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, isCountStar, isExpanded, operand, operandCount, setOperand, validate
public SqlCreateTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList columnList, org.apache.calcite.sql.SqlNodeList primaryKeyList, List<org.apache.calcite.sql.SqlNodeList> uniqueKeysList, org.apache.calcite.sql.SqlNodeList propertyList, org.apache.calcite.sql.SqlNodeList partitionKeyList, SqlWatermark watermark, org.apache.calcite.sql.SqlCharStringLiteral comment)
public org.apache.calcite.sql.SqlOperator getOperator()
getOperator
in class org.apache.calcite.sql.SqlDdl
public List<org.apache.calcite.sql.SqlNode> getOperandList()
getOperandList
in class org.apache.calcite.sql.SqlCall
public org.apache.calcite.sql.SqlIdentifier getTableName()
public org.apache.calcite.sql.SqlNodeList getColumnList()
public org.apache.calcite.sql.SqlNodeList getPropertyList()
public org.apache.calcite.sql.SqlNodeList getPartitionKeyList()
public org.apache.calcite.sql.SqlNodeList getPrimaryKeyList()
public List<org.apache.calcite.sql.SqlNodeList> getUniqueKeysList()
public Optional<SqlWatermark> getWatermark()
public Optional<org.apache.calcite.sql.SqlCharStringLiteral> getComment()
public boolean isIfNotExists()
public void validate() throws SqlValidateException
validate
in interface ExtendedSqlNode
SqlValidateException
public boolean containsComputedColumn()
public String getColumnSqlString()
create table tbl1( col1 int, col2 varchar, col3 as to_timestamp(col2) ) with ( 'connector' = 'csv' )we would return a query like:
"col1, col2, to_timestamp(col2) as col3", caution that the "computed column" operands have been reversed.
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)
unparse
in class org.apache.calcite.sql.SqlCall
public String[] fullTableName()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.