Upgrade Avro Dependency to 1.12.1#27836
Conversation
mxm
left a comment
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
Not sure how this can work, why are we omitting Fixed2?
| user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2)); | ||
| // 20.00 | ||
| user.setTypeDecimalFixed( | ||
| new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray())); | ||
| user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2)); |
There was a problem hiding this comment.
Why does the change affect both bytes and fixed type?
There was a problem hiding this comment.
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.
|
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. |
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
pom.xmland NOTICE files to upgrade the Avro VersionVerifying this change
This change is a trivial version upgrade.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation