Skip to content

GH-3899: Remove Guava from parquet-protobuf main code - #3905

Closed
Fokko wants to merge 1 commit into
apache:masterfrom
Fokko:jdk17-protobuf-drop-guava
Closed

Fokko wants to merge 1 commit into
apache:masterfrom
Fokko:jdk17-protobuf-drop-guava

Conversation

@Fokko

@Fokko Fokko commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

ProtoSchemaConverter was the only main-code Guava user in parquet-protobuf. It used ImmutableSetMultimap only to track which message types were seen at which recursion depth.

What changes are included in this PR?

Replace it with an immutable Map<String, Set<Integer>> that is copied on add, so sibling branches still don't see each other's entries.

The Guava dependency stays at compile scope on purpose: elephant-bird-core, which parquet-protobuf uses at runtime, depends on Guava. Making it test scope would make downstream users resolve elephant-bird's Guava 11.0.1. Next step is to remove elephant-bird, since it is unmaintained for a long time.

Are these changes tested?

Covered by the existing parquet-protobuf tests, including the recursion tests (ProtoRecursionTruncationTest, ProtoSchemaConverterTest).

Are there any user-facing changes?

No.

Closes #3899

This pull request and its description were written by Isaac.

ProtoSchemaConverter used ImmutableSetMultimap only to track which
message types were seen at which recursion depth. Replace it with an
immutable Map<String, Set<Integer>> that is copied on add, so sibling
branches still don't see each other's entries.

The Guava dependency stays at compile scope: elephant-bird-core, which
parquet-protobuf uses at runtime, depends on Guava and would otherwise
resolve to its very old Guava 11.0.1 for downstream users.

Co-authored-by: Isaac <[email protected]>
@Fokko
Fokko requested a review from wgtmac October 28, 2026 23:08
@Fokko Fokko closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Guava from parquet-protobuf main code

1 participant