mystic-lama commented on code in PR #1743:
URL: https://github.com/apache/orc/pull/1743#discussion_r1449836980
##########
java/core/src/java/org/apache/orc/impl/PhysicalFsWriter.java:
##########
@@ -115,8 +115,17 @@ public PhysicalFsWriter(FSDataOutputStream outputStream,
}
CompressionCodec codec = OrcCodecPool.getCodec(opts.getCompress());
if (codec != null){
- compress.withCodec(codec, codec.getDefaultOptions());
+ // HACK: Fetch Zstd-specific options and set them here -- need to find a
+ // better way before merging.
+ CompressionCodec.Options tempOptions = codec.getDefaultOptions();
Review Comment:
This is just a suggestion, we can use enhanced version of instanceOf
```
if(codec.getDefaultOptions() instanceof ZstdCodec.ZstdOptions options) {
options.setLevel(opts.getCompressionZstdLevel());
options.setWindowLog(opts.getCompressionZstdWindowLog());
options.setLongMode(opts.getCompressionZstdLongMode());
}
```
--
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]