diff --git a/docs/layouts/shortcodes/generated/orc_configuration.html b/docs/layouts/shortcodes/generated/orc_configuration.html index 92b1a9106754..ffdae855e2fa 100644 --- a/docs/layouts/shortcodes/generated/orc_configuration.html +++ b/docs/layouts/shortcodes/generated/orc_configuration.html @@ -40,7 +40,7 @@
orc.compression.zstd.level
- 1 + 3 Integer Define the compression level to use with ZStandard codec while writing data. The valid range is 1~22. diff --git a/paimon-format/src/main/java/org/apache/orc/OrcConf.java b/paimon-format/src/main/java/org/apache/orc/OrcConf.java index 6aa357868f17..a7fa1a21bc8c 100644 --- a/paimon-format/src/main/java/org/apache/orc/OrcConf.java +++ b/paimon-format/src/main/java/org/apache/orc/OrcConf.java @@ -114,7 +114,7 @@ public enum OrcConf { COMPRESSION_ZSTD_LEVEL( "orc.compression.zstd.level", "hive.exec.orc.compression.zstd.level", - 1, + 3, "Define the compression level to use with ZStandard codec " + "while writing data. The valid range is 1~22"), COMPRESSION_ZSTD_WINDOWLOG( diff --git a/paimon-format/src/test/java/org/apache/paimon/format/orc/writer/OrcZstdTest.java b/paimon-format/src/test/java/org/apache/paimon/format/orc/writer/OrcZstdTest.java index d5f8f8bc7cc7..0bf90b38a4a7 100644 --- a/paimon-format/src/test/java/org/apache/paimon/format/orc/writer/OrcZstdTest.java +++ b/paimon-format/src/test/java/org/apache/paimon/format/orc/writer/OrcZstdTest.java @@ -145,12 +145,10 @@ public void testZstdDirectDecompress() { try (ZstdCodec zstdCodec = new ZstdCodec()) { // write bytes to heap buffer. assertTrue(zstdCodec.compress(in, out, null, zstdCodec.getDefaultOptions())); - int position = out.position(); out.flip(); // copy heap buffer to direct buffer. - directOut.put(out.array()); + directOut.put(out); directOut.flip(); - directOut.limit(position); zstdCodec.decompress(directOut, directResult);