public class RichSqlInsert extends org.apache.calcite.sql.SqlInsert implements ExtendedSqlNode
SqlInsert
that have some extension functions like partition, overwrite.Constructor and Description |
---|
RichSqlInsert(org.apache.calcite.sql.parser.SqlParserPos pos,
org.apache.calcite.sql.SqlNodeList keywords,
org.apache.calcite.sql.SqlNodeList extendedKeywords,
org.apache.calcite.sql.SqlNode targetTable,
org.apache.calcite.sql.SqlNode source,
org.apache.calcite.sql.SqlNodeList columnList,
org.apache.calcite.sql.SqlNodeList staticPartitions) |
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<String,String> |
getStaticPartitionKVs()
Get static partition key value pair as strings.
|
org.apache.calcite.sql.SqlNodeList |
getStaticPartitions() |
boolean |
isOverwrite()
Returns whether the insert mode is overwrite (for whole table or for specific partitions).
|
static boolean |
isUpsert(List<org.apache.calcite.sql.SqlLiteral> keywords) |
void |
unparse(org.apache.calcite.sql.SqlWriter writer,
int leftPrec,
int rightPrec) |
void |
validate() |
getKind, getModifierNode, getOperandList, getOperator, getSource, getTargetColumnList, getTargetTable, isUpsert, setOperand, setSource, validate
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCount
public RichSqlInsert(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlNodeList keywords, org.apache.calcite.sql.SqlNodeList extendedKeywords, org.apache.calcite.sql.SqlNode targetTable, org.apache.calcite.sql.SqlNode source, org.apache.calcite.sql.SqlNodeList columnList, org.apache.calcite.sql.SqlNodeList staticPartitions)
public org.apache.calcite.sql.SqlNodeList getStaticPartitions()
public LinkedHashMap<String,String> getStaticPartitionKVs()
For character literals we return the unquoted and unescaped values.
For other types we use SqlNode.toString()
to get
the string format of the value literal. If the string format is not
what you need, use getStaticPartitions()
.
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)
unparse
in class org.apache.calcite.sql.SqlInsert
public static boolean isUpsert(List<org.apache.calcite.sql.SqlLiteral> keywords)
public boolean isOverwrite()
public void validate() throws SqlValidateException
validate
in interface ExtendedSqlNode
SqlValidateException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.