Class SqlCreateTableLike

  • All Implemented Interfaces:
    Cloneable, ExtendedSqlNode

    public class SqlCreateTableLike
    extends SqlCreateTable
    SqlNode to describe the CREATE TABLE LIKE syntax. CREATE TABLE LIKE syntax is similar as CREATE TABLE syntax, besides it has LIKE sub-clause to inherit property of an existed table.

    Example:

    
     CREATE TABLE base_table (
         id BIGINT,
         name STRING,
         tstmp TIMESTAMP,
         PRIMARY KEY(id)
     ) WITH (
         ‘connector’ = ‘kafka’,
         ‘connector.starting-offset’: ‘12345’,
         ‘format’ =  ‘json’
     )
    
     CREATE TABLE derived_table (
          a int
     )
     WITH (
       'connector' = 'jdbc',
       'url' = 'http://localhost:10000',
       'table-name' = 'derivedTable'
     )
     LIKE base_table;
     
    • Field Detail

      • OPERATOR

        public static final org.apache.calcite.sql.SqlSpecialOperator OPERATOR
    • Constructor Detail

      • SqlCreateTableLike

        public SqlCreateTableLike​(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,
                                  SqlTableLike tableLike,
                                  boolean isTemporary,
                                  boolean ifNotExists)