You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/06 07:36:27 UTC

[GitHub] [iceberg] chenjunjiedada commented on a diff in pull request #5050: Flink: Support write options in the in-line insert SQL comments

chenjunjiedada commented on code in PR #5050:
URL: https://github.com/apache/iceberg/pull/5050#discussion_r914510016


##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java:
##########
@@ -160,6 +160,49 @@ public void testUpsertAndQuery() {
     }
   }
 
+  @Test
+  public void testUpsertOptions() {
+    String tableName = "test_upsert_options";
+    LocalDate dt20220301 = LocalDate.of(2022, 3, 1);
+    LocalDate dt20220302 = LocalDate.of(2022, 3, 2);
+
+    tableUpsertProps.remove(TableProperties.UPSERT_ENABLED);
+    sql("CREATE TABLE %s(id INT NOT NULL, province STRING NOT NULL, dt DATE, PRIMARY KEY(id,province) NOT ENFORCED) " +
+            "PARTITIONED BY (province) WITH %s",
+        tableName, toWithClause(tableUpsertProps));
+
+    try {
+      sql("INSERT INTO %s /*+ OPTIONS('upsert-enabled'='true')*/  VALUES " +

Review Comment:
   Is this syntax also supported in previous flink versions?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org