You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "GGraziadei (via GitHub)" <gi...@apache.org> on 2026/09/22 17:15:46 UTC

[PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

GGraziadei opened a new pull request, #18208:
URL: https://github.com/apache/iceberg/pull/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.
   
   In principle also better perf using Guava's Iterables.
   
   Fixes #18164


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

Posted by "rdblue (via GitHub)" <gi...@apache.org>.
rdblue merged PR #18208:
URL: https://github.com/apache/iceberg/pull/18208


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

Posted by "GGraziadei (via GitHub)" <gi...@apache.org>.
GGraziadei commented on PR #18208:
URL: https://github.com/apache/iceberg/pull/18208#issuecomment-5784866716

   Hi @rdblue not worries at all! I just happened to come across the transitive dep issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

Posted by "nssalian (via GitHub)" <gi...@apache.org>.
nssalian commented on code in PR #18208:
URL: https://github.com/apache/iceberg/pull/18208#discussion_r4076586481


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java:
##########
@@ -485,7 +483,6 @@ private static List<TripleIterator<?>> children(Iterable<ParquetValueReader<?>>
     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)));

Review Comment:
   ok with the change itself, I wonder if we can reliably add a test to catch this .



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

Posted by "rdblue (via GitHub)" <gi...@apache.org>.
rdblue commented on PR #18208:
URL: https://github.com/apache/iceberg/pull/18208#issuecomment-5784669709

   Thanks, @GGraziadei! Good catch and thank you for fixing this.
   
   Not sure what I was thinking here, considering I typically prefer `Iterables.filter` in the first place! :facepalm: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Remove commons-lang3 usage from ParquetVariantReaders [iceberg]

Posted by "GGraziadei (via GitHub)" <gi...@apache.org>.
GGraziadei commented on code in PR #18208:
URL: https://github.com/apache/iceberg/pull/18208#discussion_r4076743427


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantReaders.java:
##########
@@ -485,7 +483,6 @@ private static List<TripleIterator<?>> children(Iterable<ParquetValueReader<?>>
     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)));

Review Comment:
   Hi @nssalian, thanks! I checked, and there is already a unit test covering this class. Please refer to TestVariantReaders.
   The method with this signature is used to build a ShreddedObjectReader, which is a private class used internally by ParquetVariantReaders. So I’m not planning to add any new unit tests here/already covered. wdyt?
   
   Regarding the dependency, removing the import completes the fix, so I don’t think any additional tests are required for dependecies.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org