public class RichSqlInsert
extends org.apache.calcite.sql.SqlInsert
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() |
org.apache.calcite.sql.SqlNodeList |
getTableHints()
Returns the table hints as list of
SqlNode for current insert node. |
org.apache.calcite.sql.SqlNode |
getTargetTableID()
Returns the target table identifier.
|
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) |
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 org.apache.calcite.sql.SqlNode getTargetTableID()
public org.apache.calcite.sql.SqlNodeList getTableHints()
SqlNode
for current insert node.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()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.