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