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;
43 SqlNodeList columnList,
47 pos, replace, temporary, ifNotExists, name, columnList, withOptions, query);
55 SqlNodeList columnList,
57 return new SqlCreateView(pos, replace, ifNotExists, name, columnList, query);
61 public static SqlNode
column(SqlParserPos pos,
65 ColumnStrategy strategy) {
72 SqlDataTypeSpec dataType,
74 SqlCollation collation) {
79 public static SqlNode
check(SqlParserPos pos, SqlIdentifier
name, SqlNode expression) {
85 SqlParserPos pos, SqlIdentifier
name, SqlNodeList columnList) {
91 SqlParserPos pos, SqlIdentifier
name, SqlNodeList columnList) {
102 return SqlKeyConstraint.shard(pos,
name);
107 SqlParserPos pos, SqlIdentifier columnName, SqlIdentifier referencesColumn) {
108 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 SqlKeyConstraint shard(SqlParserPos pos, SqlIdentifier name)
static SqlNode check(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
static SqlCreateTable createTable(SqlParserPos pos, boolean replace, boolean temporary, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, HeavyDBOptionsMap withOptions, SqlNode query)
static SqlCreateView createView(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)