You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "danielrod08 (via GitHub)" <gi...@apache.org> on 2026/03/26 17:46:37 UTC
[PR] Upgrade Avro Dependency to 1.12.1 [flink]
danielrod08 opened a new pull request, #27836:
URL: https://github.com/apache/flink/pull/27836
## 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "danielrod08 (via GitHub)" <gi...@apache.org>.
danielrod08 commented on code in PR #27836:
URL: https://github.com/apache/flink/pull/27836#discussion_r3014721939
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroOutputFormatTest.java:
##########
@@ -200,11 +199,9 @@ public int getAttemptNumber() {
user.setTypeTimestampMicros(Instant.ofEpochSecond(0).plus(123456L, ChronoUnit.MICROS));
// 20.00
- user.setTypeDecimalBytes(
- ByteBuffer.wrap(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2));
// 20.00
- user.setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2));
Review Comment:
Hi @mxm, thank you for the comment.
I accidentally set <enableDecimalLogicalType> 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "mukul-8 (via GitHub)" <gi...@apache.org>.
mukul-8 commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-4160751323
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](https://issues.apache.org/jira/browse/FLINK-39283). That PR covers
the same upgrade, so this one may not be needed. It might be worth coordinating there instead.`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "danielrod08 (via GitHub)" <gi...@apache.org>.
danielrod08 commented on code in PR #27836:
URL: https://github.com/apache/flink/pull/27836#discussion_r3014721939
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroOutputFormatTest.java:
##########
@@ -200,11 +199,9 @@ public int getAttemptNumber() {
user.setTypeTimestampMicros(Instant.ofEpochSecond(0).plus(123456L, ChronoUnit.MICROS));
// 20.00
- user.setTypeDecimalBytes(
- ByteBuffer.wrap(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2));
// 20.00
- user.setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2));
Review Comment:
Hi @mxm, thank you for the comment.
I accidentally set <enableDecimalLogicalType> 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-5809122915
This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-4137004236
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "2bc8b94cd7a883ea9e4291986221860f3e269c60",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2bc8b94cd7a883ea9e4291986221860f3e269c60",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2bc8b94cd7a883ea9e4291986221860f3e269c60 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-6394462180
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "danielrod08 (via GitHub)" <gi...@apache.org>.
danielrod08 commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-4136956909
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #27836: Upgrade Avro Dependency to 1.12.1
URL: https://github.com/apache/flink/pull/27836
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "mxm (via GitHub)" <gi...@apache.org>.
mxm commented on code in PR #27836:
URL: https://github.com/apache/flink/pull/27836#discussion_r2999915199
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/table/runtime/batch/AvroTypesITCase.java:
##########
@@ -114,11 +111,8 @@ class AvroTypesITCase extends AbstractTestBase {
.setTypeTimestampMillis(Instant.parse("2014-03-01T12:12:12.321Z"))
.setTypeTimestampMicros(
Instant.ofEpochSecond(0).plus(123456L, ChronoUnit.MICROS))
- .setTypeDecimalBytes(
- ByteBuffer.wrap(
- BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()))
- .setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()))
+ .setTypeDecimalBytes(BigDecimal.valueOf(2000, 2))
+ .setTypeDecimalFixed(BigDecimal.valueOf(2000, 2))
Review Comment:
Not sure how this can work, why are we omitting Fixed2?
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroOutputFormatTest.java:
##########
@@ -200,11 +199,9 @@ public int getAttemptNumber() {
user.setTypeTimestampMicros(Instant.ofEpochSecond(0).plus(123456L, ChronoUnit.MICROS));
// 20.00
- user.setTypeDecimalBytes(
- ByteBuffer.wrap(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalBytes(BigDecimal.valueOf(2000, 2));
// 20.00
- user.setTypeDecimalFixed(
- new Fixed2(BigDecimal.valueOf(2000, 2).unscaledValue().toByteArray()));
+ user.setTypeDecimalFixed(BigDecimal.valueOf(2000, 2));
Review Comment:
Why does the change affect both bytes and fixed type?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Upgrade Avro Dependency to 1.12.1 [flink]
Posted by "talatuyarer (via GitHub)" <gi...@apache.org>.
talatuyarer commented on PR #27836:
URL: https://github.com/apache/flink/pull/27836#issuecomment-4136962364
@mxm @gyfora could oyu review this ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org