nastra commented on code in PR #16881:
URL: https://github.com/apache/iceberg/pull/16881#discussion_r3450106348
##########
core/src/main/java/org/apache/iceberg/avro/Avro.java:
##########
@@ -248,26 +248,17 @@ static Context deleteContext(Map<String, String> config) {
private static CodecFactory toCodec(String codecAsString, String
compressionLevel) {
CodecFactory codecFactory;
try {
- switch (Codec.valueOf(codecAsString.toUpperCase(Locale.ENGLISH))) {
- case UNCOMPRESSED:
- codecFactory = CodecFactory.nullCodec();
- break;
- case SNAPPY:
- codecFactory = CodecFactory.snappyCodec();
- break;
- case ZSTD:
- codecFactory =
- CodecFactory.zstandardCodec(
- compressionLevelAsInt(compressionLevel,
ZSTD_COMPRESSION_LEVEL_DEFAULT));
- break;
- case GZIP:
- codecFactory =
- CodecFactory.deflateCodec(
- compressionLevelAsInt(compressionLevel,
GZIP_COMPRESSION_LEVEL_DEFAULT));
- break;
- default:
Review Comment:
we should probably keep the default branch
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]