wgtmac commented on code in PR #34873:
URL: https://github.com/apache/arrow/pull/34873#discussion_r1156616671
##########
java/compression/src/main/java/org/apache/arrow/compression/CommonsCompressionFactory.java:
##########
@@ -27,15 +27,22 @@
*/
public class CommonsCompressionFactory implements CompressionCodec.Factory {
- public static final CommonsCompressionFactory INSTANCE = new
CommonsCompressionFactory();
+ private int compressionLevel;
+
+ public CommonsCompressionFactory(int compressionLevel) {
+ this.compressionLevel = compressionLevel;
+ }
+
+ @Deprecated
+ public static final CommonsCompressionFactory INSTANCE = new
CommonsCompressionFactory(3);
@Override
public CompressionCodec createCodec(CompressionUtil.CodecType codecType) {
Review Comment:
Is it better to extend `createCodec` to add an `Optional<int> level`? The
downside of the current implementation is that we need to create separate
instances for different levels.
--
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]