17 package com.mapd.parser.extension.ddl;
22 import org.apache.calcite.schema.ColumnStrategy;
23 import org.apache.calcite.sql.SqlCollation;
24 import org.apache.calcite.sql.SqlDataTypeSpec;
25 import org.apache.calcite.sql.SqlIdentifier;
26 import org.apache.calcite.sql.SqlNode;
27 import org.apache.calcite.sql.SqlNodeList;
29 import org.apache.calcite.sql.parser.SqlParserPos;
42 SqlNodeList columnList,
46 pos, temporary, ifNotExists, name, columnList, withOptions, query);
53 SqlNodeList columnList,
55 return new SqlCreateView(pos, ifNotExists, name, columnList, query);
62 SqlIdentifier modelType,
67 pos, replace, ifNotExists, modelType, name, withOptions, query);
71 public static SqlNode
column(SqlParserPos pos,
75 ColumnStrategy strategy) {
82 SqlDataTypeSpec dataType,
84 SqlCollation collation) {
89 public static SqlNode
check(SqlParserPos pos, SqlIdentifier
name, SqlNode expression) {
95 SqlParserPos pos, SqlIdentifier
name, SqlNodeList columnList) {
101 SqlParserPos pos, SqlIdentifier
name, SqlNodeList columnList) {
112 return SqlKeyConstraint.shard(pos,
name);
117 SqlParserPos pos, SqlIdentifier columnName, SqlIdentifier referencesColumn) {
118 return SqlKeyConstraint.sharedDict(pos, columnName, referencesColumn);
static SqlNode attribute(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, SqlCollation collation)
static SqlKeyConstraint sharedDict(SqlParserPos pos, SqlIdentifier columnName, SqlIdentifier referencesColumn)
static SqlNode column(SqlParserPos pos, SqlIdentifier name, HeavyDBSqlDataTypeSpec dataType, SqlNode defaultValue, ColumnStrategy strategy)
static SqlKeyConstraint primary(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList)
static SqlKeyConstraint unique(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList)
static SqlCreateTable createTable(SqlParserPos pos, boolean temporary, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, HeavyDBOptionsMap withOptions, SqlNode query)
static SqlCreateView createView(SqlParserPos pos, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
static SqlKeyConstraint shard(SqlParserPos pos, SqlIdentifier name)
static SqlNode check(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
static SqlCreateModel createModel(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier modelType, SqlIdentifier name, HeavyDBOptionsMap withOptions, SqlNode query)