wuchong commented on a change in pull request #15709:
URL: https://github.com/apache/flink/pull/15709#discussion_r619827949
##########
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 see it's difficult to test this case for now, because we don't have a
manually progressed source (Hive source can be, but it doesn't support
watermark yet). So please verify this problem is fixed when the next RC is out.
--
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]