Skip to content

[Flink] Nanosecond support for Flink 1.19#16193

Open
talatuyarer wants to merge 2 commits intoapache:mainfrom
talatuyarer:flink-nanosecond-support-1.19
Open

[Flink] Nanosecond support for Flink 1.19#16193
talatuyarer wants to merge 2 commits intoapache:mainfrom
talatuyarer:flink-nanosecond-support-1.19

Conversation

@talatuyarer
Copy link
Copy Markdown
Contributor

Backported from Flink 2.1 version #15475

@pvary
Copy link
Copy Markdown
Contributor

pvary commented May 7, 2026

Please @talatuyarer fix the PR. This should be in 1.11.0, as the main PR has already been merged, but the backport to 1.20 did not happen.

Could you please explain these differences in flink/src/main/java/org/apache/iceberg/flink/formats/avro/typeutils/AvroSchemaConverter.java:

< +          return new AtomicDataType(
< +              new TypeInformationRawType<>(false, Types.GENERIC(Object.class)));
---
> +          throw new UnsupportedOperationException(
> +              "UNION with more than 2 types is not supported in Flink 1.20 backport.");

And in flink/src/test/java/org/apache/iceberg/flink/DataGenerators.java:

< @@ -236,10 +251,12 @@ public class DataGenerators {
<  
<        genericRecord.put("date_field", DAYS_BTW_EPOC_AND_20220110);
---
> @@ -238,8 +253,10 @@ public class DataGenerators {
1798,1799c1794,1795
< -      // Although Avro logical type for timestamp fields are in micro seconds,
< -      // AvroToRowDataConverters only looks for long value in milliseconds.
---
>        // Although Avro logical type for timestamp fields are in micro seconds,
>        // AvroToRowDataConverters only looks for long value in milliseconds.
1802,1803d1797
< +      // Now that AvroToRowDataConverters correctly supports microseconds,
< +      // we must inject correct microsecond scale values into the Avro data.
1943c1937

@pvary
Copy link
Copy Markdown
Contributor

pvary commented May 7, 2026

Also, spotless needs to be run on the PR

@pvary
Copy link
Copy Markdown
Contributor

pvary commented May 7, 2026

Created a PR so we can unblock the release if we need to: #16240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants