KurtYoung commented on a change in pull request #8758: [FLINK-12867] Add insert
overwrite grammar as HIVE dialect
URL: https://github.com/apache/flink/pull/8758#discussion_r294210227
##########
File path:
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/dml/RichSqlInsert.java
##########
@@ -93,6 +97,41 @@ public SqlNodeList getStaticPartitions() {
getSource().unparse(writer, 0, 0);
}
+ //~ Tools
------------------------------------------------------------------
+
+ public static boolean isUpsert2(List<SqlLiteral> keywords) {
+ for (SqlNode keyword : keywords) {
+ RichSqlInsertKeyword keyword2 =
+ ((SqlLiteral)
keyword).symbolValue(RichSqlInsertKeyword.class);
+ if (keyword2 == RichSqlInsertKeyword.UPSERT) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /** Returns whether this is an UPSERT. */
+ public boolean isUpsert2() {
+ return getModifierNode2(RichSqlInsertKeyword.UPSERT) != null;
+ }
+
+ /** Returns whether the insert mode is overwrite
Review comment:
Please align with Flink's comment style
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services