Class SqlAlterTable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean ifTableExists  
      static org.apache.calcite.sql.SqlSpecialOperator OPERATOR  
      protected org.apache.calcite.sql.SqlNodeList partitionSpec  
      protected org.apache.calcite.sql.SqlIdentifier tableIdentifier  
      • Fields inherited from class org.apache.calcite.sql.SqlNode

        EMPTY_ARRAY, pos
    • Constructor Summary

      Constructors 
      Constructor Description
      SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, boolean ifTableExists)  
      SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList partitionSpec)  
      SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList partitionSpec, boolean ifTableExists)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String[] fullTableName()  
      org.apache.calcite.sql.SqlOperator getOperator()  
      LinkedHashMap<String,​String> getPartitionKVs()
      Get partition spec as key-value strings.
      org.apache.calcite.sql.SqlNodeList getPartitionSpec()
      Returns the partition spec if the ALTER should be applied to partitions, and null otherwise.
      org.apache.calcite.sql.SqlIdentifier getTableName()  
      boolean ifTableExists()
      Whether to ignore the error if the table doesn't exist.
      void unparse​(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)  
      • Methods inherited from class org.apache.calcite.sql.SqlCall

        accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, getOperandList, isCountStar, isExpanded, operand, operandCount, setOperand, validate
      • Methods 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 Detail

      • OPERATOR

        public static final org.apache.calcite.sql.SqlSpecialOperator OPERATOR
      • tableIdentifier

        protected final org.apache.calcite.sql.SqlIdentifier tableIdentifier
      • partitionSpec

        protected final org.apache.calcite.sql.SqlNodeList partitionSpec
      • ifTableExists

        protected final boolean ifTableExists
    • Constructor Detail

      • SqlAlterTable

        public SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos,
                             org.apache.calcite.sql.SqlIdentifier tableName,
                             @Nullable
                             org.apache.calcite.sql.SqlNodeList partitionSpec,
                             boolean ifTableExists)
      • SqlAlterTable

        public SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos,
                             org.apache.calcite.sql.SqlIdentifier tableName,
                             boolean ifTableExists)
      • SqlAlterTable

        public SqlAlterTable​(org.apache.calcite.sql.parser.SqlParserPos pos,
                             org.apache.calcite.sql.SqlIdentifier tableName,
                             @Nullable
                             org.apache.calcite.sql.SqlNodeList partitionSpec)
    • Method Detail

      • getOperator

        public org.apache.calcite.sql.SqlOperator getOperator()
        Specified by:
        getOperator in class org.apache.calcite.sql.SqlCall
      • getTableName

        public org.apache.calcite.sql.SqlIdentifier getTableName()
      • unparse

        public void unparse​(org.apache.calcite.sql.SqlWriter writer,
                            int leftPrec,
                            int rightPrec)
        Overrides:
        unparse in class org.apache.calcite.sql.SqlCall
      • fullTableName

        public String[] fullTableName()
      • getPartitionSpec

        public org.apache.calcite.sql.SqlNodeList getPartitionSpec()
        Returns the partition spec if the ALTER should be applied to partitions, and null otherwise.
      • ifTableExists

        public boolean ifTableExists()
        Whether to ignore the error if the table doesn't exist.
        Returns:
        true when IF EXISTS is specified.