Hisoka-X commented on code in PR #8769:
URL: https://github.com/apache/seatunnel/pull/8769#discussion_r1964668736


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/AbstractWriteStrategy.java:
##########
@@ -224,8 +224,16 @@ public LinkedHashMap<String, List<String>> 
generatorPartitionDir(SeaTunnelRow se
     public final String generateFileName(String transactionId) {
         String fileNameExpression = fileSinkConfig.getFileNameExpression();
         FileFormat fileFormat = fileSinkConfig.getFileFormat();
-        String suffix = fileFormat.getSuffix();
-        suffix = compressFormat.getCompressCodec() + suffix;
+        String suffix;
+        if (StringUtils.isNotEmpty(fileSinkConfig.getFilenameExtension())) {
+            suffix =
+                    fileSinkConfig.getFilenameExtension().startsWith(".")
+                            ? fileSinkConfig.getFilenameExtension()
+                            : "." + fileSinkConfig.getFilenameExtension();

Review Comment:
   I'm not sure if this is appropriate, as the `.` is pretty common. Not a 
specific text, maybe you could start a discussion on the mailing list. See what 
others think? It makes sense to me to change it or not. PS: If we need change 
it, we can open another PR.



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to