Package org.apache.flink.sql.parser.ddl
Class SqlCreateTable
java.lang.Object
org.apache.calcite.sql.SqlNode
org.apache.calcite.sql.SqlCall
org.apache.calcite.sql.SqlDdl
org.apache.calcite.sql.SqlCreate
org.apache.flink.sql.parser.ddl.SqlCreateTable
- All Implemented Interfaces:
Cloneable,ExtendedSqlNode
- Direct Known Subclasses:
SqlCreateTableAs,SqlCreateTableLike
CREATE TABLE DDL sql call.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTable creation context. -
Field Summary
FieldsFields inherited from class org.apache.calcite.sql.SqlCreate
ifNotExistsFields inherited from class org.apache.calcite.sql.SqlDdl
DDL_OPERATORFields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionSqlCreateTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList propertyList, SqlDistribution distribution, org.apache.calcite.sql.SqlNodeList partitionKeyList, SqlWatermark watermark, org.apache.calcite.sql.SqlCharStringLiteral comment, boolean isTemporary, boolean ifNotExists) protectedSqlCreateTable(org.apache.calcite.sql.SqlSpecialOperator operator, org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList propertyList, SqlDistribution distribution, org.apache.calcite.sql.SqlNodeList partitionKeyList, SqlWatermark watermark, org.apache.calcite.sql.SqlCharStringLiteral comment, boolean isTemporary, boolean ifNotExists) -
Method Summary
Modifier and TypeMethodDescriptionString[]org.apache.calcite.sql.SqlNodeListReturns the projection format of the DDL columns(including computed columns). i.e. the following DDL:Optional<org.apache.calcite.sql.SqlCharStringLiteral>Returns the column constraints plus the table constraints.List<org.apache.calcite.sql.SqlNode>org.apache.calcite.sql.SqlOperatororg.apache.calcite.sql.SqlNodeListorg.apache.calcite.sql.SqlNodeListorg.apache.calcite.sql.SqlIdentifierbooleanbooleanbooleanvoidunparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec) voidvalidate()Methods inherited from class org.apache.calcite.sql.SqlCreate
getReplace, setReplaceMethods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, isCountStar, isExpanded, operand, operandCount, setOperand, validateMethods inherited from class org.apache.calcite.sql.SqlNode
clone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toList, toList, toSqlString, toSqlString, toSqlString, toString, unparseWithParentheses, validateExpr
-
Field Details
-
OPERATOR
public static final org.apache.calcite.sql.SqlSpecialOperator OPERATOR
-
-
Constructor Details
-
SqlCreateTable
public SqlCreateTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList propertyList, SqlDistribution distribution, org.apache.calcite.sql.SqlNodeList partitionKeyList, @Nullable SqlWatermark watermark, @Nullable org.apache.calcite.sql.SqlCharStringLiteral comment, boolean isTemporary, boolean ifNotExists) -
SqlCreateTable
protected SqlCreateTable(org.apache.calcite.sql.SqlSpecialOperator operator, org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> tableConstraints, org.apache.calcite.sql.SqlNodeList propertyList, @Nullable SqlDistribution distribution, org.apache.calcite.sql.SqlNodeList partitionKeyList, @Nullable SqlWatermark watermark, @Nullable org.apache.calcite.sql.SqlCharStringLiteral comment, boolean isTemporary, boolean ifNotExists)
-
-
Method Details
-
getDistribution
-
getOperator
@Nonnull public org.apache.calcite.sql.SqlOperator getOperator()- Overrides:
getOperatorin classorg.apache.calcite.sql.SqlDdl
-
getOperandList
- Specified by:
getOperandListin classorg.apache.calcite.sql.SqlCall
-
getTableName
public org.apache.calcite.sql.SqlIdentifier getTableName() -
getColumnList
public org.apache.calcite.sql.SqlNodeList getColumnList() -
getPropertyList
public org.apache.calcite.sql.SqlNodeList getPropertyList() -
getPartitionKeyList
public org.apache.calcite.sql.SqlNodeList getPartitionKeyList() -
getTableConstraints
-
getWatermark
-
getComment
-
isIfNotExists
public boolean isIfNotExists() -
isTemporary
public boolean isTemporary() -
validate
- Specified by:
validatein interfaceExtendedSqlNode- Throws:
SqlValidateException
-
hasRegularColumnsOnly
public boolean hasRegularColumnsOnly() -
getFullConstraints
Returns the column constraints plus the table constraints. -
getColumnSqlString
Returns the projection format of the DDL columns(including computed columns). i.e. the following DDL:create table tbl1( col1 int, col2 varchar, col3 as to_timestamp(col2) ) with ( 'connector' = 'csv' )is equivalent with query "col1, col2, to_timestamp(col2) as col3", caution that the "computed column" operands have been reversed.
-
unparse
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec) - Overrides:
unparsein classorg.apache.calcite.sql.SqlCall
-
fullTableName
-