From 8f104b2f365038b6d61b4a83bbe81761e7ea306b Mon Sep 17 00:00:00 2001 From: Gloria Doci Date: Mon, 30 Oct 2023 10:55:22 +0000 Subject: [PATCH] allow only GZIP as compression algorithm --- src/main/java/net/snowflake/ingest/utils/Constants.java | 9 ++------- .../ingest/streaming/internal/ParameterProviderTest.java | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/snowflake/ingest/utils/Constants.java b/src/main/java/net/snowflake/ingest/utils/Constants.java index 3fc99f147..a22bc9f21 100644 --- a/src/main/java/net/snowflake/ingest/utils/Constants.java +++ b/src/main/java/net/snowflake/ingest/utils/Constants.java @@ -119,15 +119,10 @@ public static BdecVersion fromInt(int val) { * CompressionCodecName, but we want to control and allow only specific values of that. */ public enum BdecParquetCompression { - UNCOMPRESSED, - GZIP, - SNAPPY, - ZSTD; + GZIP; public CompressionCodecName getCompressionCodec() { - return (this == UNCOMPRESSED - ? CompressionCodecName.fromConf(null) - : CompressionCodecName.fromConf(this.name())); + return CompressionCodecName.fromConf(this.name()); } public static BdecParquetCompression fromName(String name) { diff --git a/src/test/java/net/snowflake/ingest/streaming/internal/ParameterProviderTest.java b/src/test/java/net/snowflake/ingest/streaming/internal/ParameterProviderTest.java index 256b5222f..cde16458c 100644 --- a/src/test/java/net/snowflake/ingest/streaming/internal/ParameterProviderTest.java +++ b/src/test/java/net/snowflake/ingest/streaming/internal/ParameterProviderTest.java @@ -42,7 +42,7 @@ public void withValuesSet() { Assert.assertEquals(1000L, parameterProvider.getMaxMemoryLimitInBytes()); Assert.assertEquals(1000000L, parameterProvider.getMaxChannelSizeInBytes()); Assert.assertEquals( - Constants.BdecParquetCompression.ZSTD, + Constants.BdecParquetCompression.GZIP, parameterProvider.getBdecParquetCompressionAlgorithm()); }