litiliu commented on code in PR #8769:
URL: https://github.com/apache/seatunnel/pull/8769#discussion_r1962948805
##########
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:
`.` may be widely used in this project, should we extract to the constant
instead of using the magic value?
--
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]