Skip to content

Upgrade Avro dependency from 1.11.5 to 1.12.2 - #3731

Open
iemejia wants to merge 1 commit into
apache:masterfrom
iemejia:parquet-avro-dep-upgrade
Open

Upgrade Avro dependency from 1.11.5 to 1.12.2#3731
iemejia wants to merge 1 commit into
apache:masterfrom
iemejia:parquet-avro-dep-upgrade

Conversation

@iemejia

@iemejia iemejia commented Aug 18, 2026

Copy link
Copy Markdown
Member

Rationale for this change

Upgrades the Avro dependency from 1.11.5 to 1.12.2.

Avro 1.12 introduces some behavioral and API-compatibility changes that require corresponding adjustments in parquet-avro:

  • Null logicalType NPE: GenericData.getConversionByClass no longer null-checks logicalType internally, so AvroRecordConverter.newConverter now guards against a null logicalType to avoid an NPE.
  • Stricter array typing: Avro 1.12's ReflectData.setField performs stricter type checks, so AvroArrayConverter.end now creates a typed array (via Array.newInstance(elementClass, 0)) instead of an untyped Object[].
  • ClassSecurityValidator: Avro 1.12's ClassSecurityValidator requires whitelisting serializable packages; the org.apache.avro.SERIALIZABLE_PACKAGES surefire system property is added for the tests.

What changes are included in this PR?

  • Bump avro.version to 1.12.2 in the root pom.xml.
  • Guard against null logicalType in AvroRecordConverter.newConverter.
  • Create typed arrays instead of Object[] in AvroArrayConverter.end.
  • Add the SERIALIZABLE_PACKAGES surefire property in parquet-avro/pom.xml.

Are these changes tested?

Yes, covered by the existing parquet-avro test suite.

Are there any user-facing changes?

Users of parquet-avro will now pull in Avro 1.12.2.

- Guard against null logicalType in AvroRecordConverter.newConverter to
  avoid NPE in GenericData.getConversionByClass (Avro 1.12 no longer
  null-checks logicalType internally)
- Create typed arrays instead of Object[] in AvroArrayConverter.end to
  satisfy Avro 1.12's stricter ReflectData.setField type checks
- Add SERIALIZABLE_PACKAGES surefire property for Avro 1.12's
  ClassSecurityValidator
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.

1 participant