luoyuxia commented on code in PR #20599:
URL: https://github.com/apache/flink/pull/20599#discussion_r947661192


##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveTableSinkITCase.java:
##########
@@ -576,6 +576,24 @@ public void testWriteSuccessFile() throws Exception {
         assertThat(new File(changeFileNameTablePath, 
"dt=2022-08-15/_ZM")).exists();
     }
 
+    @Test
+    public void testInsertBothDynamicAndStaticPartitionWithoutData() throws 
Exception {

Review Comment:
   I think we can just add the test case in 
HiveTableSinkITCase#testWritingNoDataToPartition.



##########
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/FileSystemCommitter.java:
##########
@@ -91,7 +96,15 @@ public void commitPartitions() throws Exception {
                         overwrite, fs, metaStoreFactory, isToLocal, 
identifier, policies)) {
             if (partitionColumnSize > 0) {
                 if (taskPaths.isEmpty() && !staticPartitions.isEmpty()) {
-                    loader.loadEmptyPartition(this.staticPartitions);
+                    if (partitionColumnSize == staticPartitions.size()) {
+                        loader.loadEmptyPartition(this.staticPartitions);
+                    } else {
+                        LOG.warn(

Review Comment:
   I don't think we need warn it as it's normal when there's no data written to 
it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to