Repository navigation
Conversation
Now that the minimum JDK is 17, replace Guava collection factories, ImmutableList/ImmutableSet/ImmutableMap, Joiner, Splitter, Objects, MoreObjects and simple Iterables/Predicate/Function usages in parquet-cli with JDK equivalents, and switch Guava Preconditions to org.apache.parquet.Preconditions (all call sites use %s-only messages with matching argument counts) and Objects.requireNonNull. Guava usages without a clean JDK equivalent are kept: Closeables, CharMatcher, Ascii, HashCode, CharStreams, Resources, Iterators.transform and VisibleForTesting. Co-authored-by: Isaac <[email protected]>
wgtmac
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Most of parquet-cli's Guava usage has a direct JDK 17 equivalent.
What changes are included in this PR?
Lists/Maps/Setsfactories become JDK constructors.Immutable*becomesList/Set/Map.of/copyOf, only where the collection is never iterated for output or never holds nulls; ordered output keepsLinkedHashMap.Joiner/SplitterbecomeString.join/String.split(..., -1).MoreObjects/Objectsbecomejava.util.Objectsor a plaintoString.Preconditionsbecomesorg.apache.parquet.Preconditions/Objects.requireNonNull.parquet-cli/src/maingo from 85 to 15. The kept ones have no clean JDK equivalent:Closeables.close(x, threw),CharMatcher,Ascii,HashCode,CharStreams,Resources,Iterators.transformandVisibleForTesting.Are these changes tested?
Covered by the existing parquet-cli test suite.
Are there any user-facing changes?
No.
Closes #3900
This pull request and its description were written by Isaac.