leonardBang commented on a change in pull request #15709:
URL: https://github.com/apache/flink/pull/15709#discussion_r619737123



##########
File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveTableSinkITCase.java
##########
@@ -223,6 +225,130 @@ public void testStreamingAppend() throws Exception {
                 });
     }
 
+    @Test(timeout = 120000)
+    public void testStreamingSinkOnTimestampLtzWatermrk() throws Exception {
+        testStreamingWriteWithTimestampLtzWatermark(this::checkSuccessFiles);
+    }
+
+    private void testStreamingWriteWithTimestampLtzWatermark(Consumer<String> 
pathConsumer)
+            throws Exception {
+        StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
+        env.setParallelism(1);
+        env.enableCheckpointing(100);
+        StreamTableEnvironment tEnv = 
HiveTestUtils.createTableEnvWithBlinkPlannerStreamMode(env);
+
+        tEnv.registerCatalog(hiveCatalog.getName(), hiveCatalog);
+        tEnv.useCatalog(hiveCatalog.getName());
+        tEnv.getConfig().setSqlDialect(SqlDialect.HIVE);
+        try {
+            tEnv.executeSql("create database db1");
+            tEnv.useDatabase("db1");
+            tEnv.executeSql(
+                    "create external table sink_table ("
+                            + " a int,"
+                            + " b string,"
+                            + " c string)"
+                            + " partitioned by (d string,e string)"
+                            + " stored as parquet TBLPROPERTIES ("
+                            + " 
'partition.time-extractor.timestamp-pattern'='$d $e:00:00',"
+                            + " 
'sink.partition-commit.trigger'='partition-time',"
+                            + " 'sink.partition-commit.delay'='1h',"
+                            + " 
'sink.partition-commit.watermark-time-zone'='Asia/Shanghai',"

Review comment:
       I also found this problem ,I just debugged `PartitionTimeCommitTrigger` 
to make sure the config option works

##########
File path: docs/content/docs/connectors/table/filesystem.md
##########
@@ -225,6 +225,12 @@ To define when to commit a partition, providing partition 
commit trigger:
         <td>Duration</td>
         <td>The partition will not commit until the delay time. If it is a 
daily partition, should be '1 d', if it is a hourly partition, should be '1 
h'.</td>
     </tr>
+    <tr>
+        <td><h5>sink.partition-commit.watermark-time-zone</h5></td>

Review comment:
       The `partition-time` is a string with TIMESTAMP meaning, and I think 
it's not correct to say the `partition-time` has time zone. And the watermark 
is a long value, it can be explained as UTC timestamp mills or Instant mills, I 
tend to  use current option name 




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


Reply via email to