Skip to content

Upgrade Avro Dependency to 1.12.1#27836

Draft
danielrod08 wants to merge 2 commits intoapache:masterfrom
danielrod08:upgrade-avro-version
Draft

Upgrade Avro Dependency to 1.12.1#27836
danielrod08 wants to merge 2 commits intoapache:masterfrom
danielrod08:upgrade-avro-version

Conversation

@danielrod08
Copy link
Copy Markdown

What is the purpose of the change

This pull request upgrades the Apache Avro dependency from version 1.11.4 to 1.12.1 in order to support nanosecond-precision (as described in this PR #27770).

Brief change log

  • Modified pom.xml and NOTICE files to upgrade the Avro Version

Verifying this change

This change is a trivial version upgrade.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): yes
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@talatuyarer
Copy link
Copy Markdown

talatuyarer commented Mar 26, 2026

@mxm @gyfora could you review this ?

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Mar 26, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@danielrod08 danielrod08 marked this pull request as draft March 26, 2026 19:55
Copy link
Copy Markdown
Contributor

@mxm mxm left a comment

Choose a reason for hiding this comment

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

Thanks @danielrod08! Is this an API-only change which will not impact the wire format?

.setTypeDecimalFixed(
new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()))
.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2))
.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure how this can work, why are we omitting Fixed2?

Comment on lines +202 to +204
user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2));
// 20.00
user.setTypeDecimalFixed(
new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why does the change affect both bytes and fixed type?

Copy link
Copy Markdown
Author

@danielrod08 danielrod08 Mar 31, 2026

Choose a reason for hiding this comment

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

Hi @mxm, thank you for the comment.
I accidentally set to true in the pom.xml. This caused the generated User class to only accept BigDecimal values for both setTypeDecimalFixed and setTypeDecimalBytes. I am currently removing this configuration and resolving the resulting issues, and reversing the changes I made to the tests.

@mukul-8
Copy link
Copy Markdown
Contributor

mukul-8 commented Mar 31, 2026

Thanks for the effort @danielrod08. Just a heads up — there's already an open PR for the Avro 1.12.1 version bump: #27806 by @snuyanzin, which addresses FLINK-39283. That PR covers the same upgrade, so this one may not be needed. It might be worth coordinating there instead.

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.

5 participants