Skip to content

Conversation

@dossett
Copy link
Contributor

@dossett dossett commented Dec 29, 2025

Move on from Java 8 in parquet-{common,column,hadoop}. This PR was created with codex and this is how it describes the changes:

What changed (Java 11 cleanups enabled by dropping Java 8):

  • Replaced Arrays.asList(...) and other collection boilerplate with List.of(...) where nulls aren’t used, reducing allocations and improving clarity.
  • Used Set.of(...) for small constant sets to simplify initialization.
  • Tightened helper/collection usages in tests to lean on Java 9+ convenience factories.
  • Kept Arrays.asList(...) where nulls are required to preserve behavior.

@dossett
Copy link
Contributor Author

dossett commented Dec 29, 2025

There's a CI failure that I really don't think is related to my change. Is this a known flaky test?

Error:  org.apache.parquet.column.values.bitpacking.TestByteBitPacking512VectorLE.unpackValuesUsingVector -- Time elapsed: 3.877 s <<< ERROR!
java.lang.OutOfMemoryError: Java heap space```

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @dossett

public static class IntLogicalTypeAnnotation extends LogicalTypeAnnotation {
private static final Set<Integer> VALID_BIT_WIDTH =
Collections.unmodifiableSet(new HashSet<>(asList(8, 16, 32, 64)));
private static final Set<Integer> VALID_BIT_WIDTH = Set.of(8, 16, 32, 64);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set.of is also immutable 👍

@Fokko Fokko merged commit aa41aa1 into apache:master Jan 13, 2026
5 checks passed
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.

2 participants