Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/22718 )
Change subject: IMPALA-13923: Support more compression levels for ZSTD and ZLIB ...................................................................... Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/22718/3/be/src/util/compress.h File be/src/util/compress.h: http://gerrit.cloudera.org:8080/#/c/22718/3/be/src/util/compress.h@48 PS3, Line 48: int compression_level = Z_DEFAULT_COMPRESSION); > Thank you for the helpful comments!! One way to do this is to keep Codec::ValidateCompressionLevel() static and add static functions to GzipCompressor and ZstandardCompressor for validating their compression levels: static Status ValidateCompressionLevel(int compression_level); The Codec::ValidateCompressionLevel() would dispatch to the validation function for each compressor: Status Codec::ValidateCompressionLevel(THdfsCompression::type format, int compression_level) { switch (format) { case THdfsCompression::GZIP: case THdfsCompression::ZLIB: case THdfsCompression::DEFLATE: return GzipCompressor::ValidateCompressionLevel(compression_level); case THdfsCompression::ZSTD: return ZstandardCompressor::ValidateCompressionLevel(compression_level); default: return Status("Compression levels are not supported for this codec."); } } -- To view, visit http://gerrit.cloudera.org:8080/22718 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5b98c735246f08e04598a4e752c8cca04e31a88a Gerrit-Change-Number: 22718 Gerrit-PatchSet: 3 Gerrit-Owner: Surya Hebbar <sheb...@cloudera.com> Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Surya Hebbar <sheb...@cloudera.com> Gerrit-Comment-Date: Fri, 25 Apr 2025 23:51:59 +0000 Gerrit-HasComments: Yes