This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 8919dd0f8 ORC-2079: Add `lz4` codec pool test coverage
8919dd0f8 is described below

commit 8919dd0f8f1a90eecf4446b51726bd0b69d67778
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Feb 6 13:33:56 2026 -0800

    ORC-2079: Add `lz4` codec pool test coverage
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `lz4` codec pool test coverage.
    
    ### Why are the changes needed?
    
    To improve test coverage and help the future LZ4 migration like the 
following.
    - #2511
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    `Gemini 3 Pro (High)` on `Antigravity`.
    
    Closes #2517 from dongjoon-hyun/ORC-2079.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/core/src/test/org/apache/orc/TestVectorOrcFile.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/java/core/src/test/org/apache/orc/TestVectorOrcFile.java 
b/java/core/src/test/org/apache/orc/TestVectorOrcFile.java
index da1d43085..11ecf9132 100644
--- a/java/core/src/test/org/apache/orc/TestVectorOrcFile.java
+++ b/java/core/src/test/org/apache/orc/TestVectorOrcFile.java
@@ -2346,7 +2346,7 @@ public class TestVectorOrcFile implements TestConf {
     WriterOptions opts = OrcFile.writerOptions(conf)
         
.setSchema(schema).stripeSize(1000).bufferSize(100).version(fileFormat);
 
-    CompressionCodec snappyCodec, zlibCodec, zstdCodec;
+    CompressionCodec snappyCodec, zlibCodec, zstdCodec, lz4Codec;
     snappyCodec = writeBatchesAndGetCodec(10, 1000, 
opts.compress(CompressionKind.SNAPPY), batch);
     assertEquals(1, OrcCodecPool.getPoolSize(CompressionKind.SNAPPY));
     Reader reader = OrcFile.createReader(testFilePath, 
OrcFile.readerOptions(conf).filesystem(fs));
@@ -2375,6 +2375,13 @@ public class TestVectorOrcFile implements TestConf {
     assertEquals(1, OrcCodecPool.getPoolSize(CompressionKind.ZSTD));
     assertSame(zstdCodec, codec);
 
+    lz4Codec = writeBatchesAndGetCodec(10, 1000, 
opts.compress(CompressionKind.LZ4), batch);
+    assertNotSame(zstdCodec, lz4Codec);
+    assertEquals(1, OrcCodecPool.getPoolSize(CompressionKind.LZ4));
+    codec = writeBatchesAndGetCodec(10, 1000, 
opts.compress(CompressionKind.LZ4), batch);
+    assertEquals(1, OrcCodecPool.getPoolSize(CompressionKind.LZ4));
+    assertSame(lz4Codec, codec);
+
     assertSame(snappyCodec, OrcCodecPool.getCodec(CompressionKind.SNAPPY));
     CompressionCodec snappyCodec2 = writeBatchesAndGetCodec(
         10, 1000, opts.compress(CompressionKind.SNAPPY), batch);

Reply via email to