Skip to content

Commit

Permalink
[format] Set orc.compression.zstd.level to 3 by default (#3114)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyl891229 authored Mar 29, 2024
1 parent ac27b66 commit 93fda44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/layouts/shortcodes/generated/orc_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</tr>
<tr>
<td><h5>orc.compression.zstd.level</h5></td>
<td style="word-wrap: break-word;">1</td>
<td style="word-wrap: break-word;">3</td>
<td>Integer</td>
<td>Define the compression level to use with ZStandard codec while writing data. The valid range is 1~22.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion paimon-format/src/main/java/org/apache/orc/OrcConf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 93fda44

Please sign in to comment.