17 package com.mapd.parser.extension.ddl;
19 import org.apache.calcite.sql.SqlCall;
20 import org.apache.calcite.sql.SqlIdentifier;
21 import org.apache.calcite.sql.SqlKind;
22 import org.apache.calcite.sql.SqlNode;
24 import org.apache.calcite.sql.SqlSpecialOperator;
25 import org.apache.calcite.sql.SqlWriter;
26 import org.apache.calcite.sql.parser.SqlParserPos;
27 import org.apache.calcite.util.ImmutableNullableList;
29 import java.util.List;
38 private static final SqlSpecialOperator
OPERATOR =
39 new SqlSpecialOperator(
"CHECK", SqlKind.CHECK);
41 private final SqlIdentifier
name;
62 public void unparse(SqlWriter writer,
int leftPrec,
int rightPrec) {
64 writer.keyword(
"CONSTRAINT");
65 name.unparse(writer, 0, 0);
67 writer.keyword(
"CHECK");
68 if (writer.isAlwaysUseParentheses()) {
69 expression.unparse(writer, 0, 0);
72 expression.unparse(writer, 0, 0);
static final SqlSpecialOperator OPERATOR
void unparse(SqlWriter writer, int leftPrec, int rightPrec)
SqlOperator getOperator()
SqlCheckConstraint(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
List< SqlNode > getOperandList()