Skip to content

Commit

Permalink
allow only GZIP as compression algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-gdoci committed Oct 30, 2023
1 parent 333bc07 commit 8f104b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/main/java/net/snowflake/ingest/utils/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 8f104b2

Please sign in to comment.