JingsongLi commented on code in PR #1500:
URL: https://github.com/apache/incubator-paimon/pull/1500#discussion_r1253827727


##########
paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java:
##########
@@ -90,11 +97,21 @@ public DataFilePathFactory pathFactory() {
     }
 
     public RollingFileWriter<KeyValue, DataFileMeta> 
createRollingMergeTreeFileWriter(int level) {
+        updateFormatByLevel(level);
         return new RollingFileWriter<>(
                 () -> createDataFileWriter(pathFactory.newPath(), level, 
getCompression(level)),
                 suggestedFileSize);
     }
 
+    private void updateFormatByLevel(int level) {
+        String fileFormat = levelFormats.get(level);
+        if (null != fileFormat) {
+            pathFactory.setFormatIdentifier(fileFormat);

Review Comment:
   Do not provide `setFormatIdentifier`, This is difficult to maintain.
   
   A better way is to pass parameters when you need to do something, rather 
than setting its class variables.



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