[ 
https://issues.apache.org/jira/browse/FLINK-37198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081768#comment-18081768
 ] 

袁焊忠 commented on FLINK-37198:
-----------------------------

I can try to take this one.

The issue looks well scoped to the Avro row-data conversion path. The top-level 
createRowConverter(RowType, boolean) receives the legacyTimestampMapping flag, 
and arrays/maps pass that flag through, but the nested ROW branch currently 
calls createRowConverter((RowType) type), which falls back to the legacy 
default.

I will first add a regression test with a nested ROW containing 
TIMESTAMP_WITH_LOCAL_TIME_ZONE using the non-legacy mapping, then keep the code 
change limited to propagating the flag through the nested ROW converter if the 
test reproduces the problem.

> AvroToRowDataConverters factory omits legacyTimestampMapping option for 
> nested Row.
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-37198
>                 URL: https://issues.apache.org/jira/browse/FLINK-37198
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Type Serialization System
>    Affects Versions: 1.20.0
>            Reporter: Juliusz Nadberezny
>            Priority: Minor
>
> A{{{}vroToRowDataConverters#createRowConverter{}}} method skips 
> legacyTimestampMapping option when defining nested {{Row}} converter.
> The problem is in the following line:
> [https://github.com/apache/flink/blob/533ead6ae946cbc77525d276b6dea965d390181a/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroToRowDataConverters.java#L149]
> It should be:
> {{createRowConverter((RowType) type, legacyTimestampMapping)}}
> Instead of:
> {{createRowConverter((RowType) type)}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to