This is an automated email from the ASF dual-hosted git repository.
rdblue pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 7b1934b552 Parquet: Remove commons-lang3 usage from
ParquetVariantReaders (#18208)
7b1934b552 is described below
commit 7b1934b552ec95e4af98fe19ada4ce3c9a7e74cb
Author: Gianluca Graziadei <[email protected]>
AuthorDate: Tue Sep 22 23:42:21 2026 +0200
Parquet: Remove commons-lang3 usage from ParquetVariantReaders (#18208)
ParquetVariantReaders.children called commons-lang3 Streams.of(Iterable),
which only exists in commons-lang3 3.13.0 and later. iceberg-parquet does
not declare commons-lang3 as a dependency, so on classpaths that provide
an older version (Hadoop 3.3.x/3.4.x, orc-core 1.9.x, Spark 3.5,
Flink 1.20 all ship 3.12.0) reading any variant column fails with
NoSuchMethodError. Replace the call with the bundled Guava Iterables
equivalent so the reader has no dependency on commons-lang3.
Fixes #18164
---
.../main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
a/parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java
b/parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java
index fc235b1f0d..ecb50e7179 100644
---
a/parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java
+++
b/parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java
@@ -23,8 +23,6 @@ import java.nio.ByteOrder;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
-import java.util.stream.Collectors;
-import org.apache.commons.lang3.stream.Streams;
import org.apache.iceberg.parquet.ParquetValueReaders.PrimitiveReader;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
@@ -485,7 +483,6 @@ public class ParquetVariantReaders {
return ImmutableList.copyOf(
Iterables.concat(
Iterables.transform(
-
Streams.of(readers).filter(Objects::nonNull).collect(Collectors.toList()),
- ParquetValueReader::columns)));
+ Iterables.filter(readers, Objects::nonNull),
ParquetValueReader::columns)));
}
}