codope commented on code in PR #11066:
URL: https://github.com/apache/hudi/pull/11066#discussion_r1574689021
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/AvroToRowDataConverters.java:
##########
@@ -233,7 +237,11 @@ private static AvroToRowDataConverter
createTimestampConverter(int precision) {
"Unexpected object type for TIMESTAMP logical type. Received: "
+ avroObject);
}
}
- return TimestampData.fromInstant(instant);
+ if (utcTimezone) {
Review Comment:
Was this not handled for some purpose? The comment in the test said
"FlinkOptions.READ_UTC_TIMEZONE doesn't affect in MergeOnReadInputFormat since
the option isn't supported in AvroToRowDataConverters". Do we know why it was
not supported before?
cc @danny0405
##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/ITTestHoodieDataSource.java:
##########
@@ -1849,8 +1849,7 @@ void testWriteReadWithTimestampWithoutTZ(HoodieTableType
tableType) {
.option(FlinkOptions.PRECOMBINE_FIELD, "f1")
.option(FlinkOptions.TABLE_TYPE, tableType)
.option(FlinkOptions.WRITE_UTC_TIMEZONE, false)
- //FlinkOptions.READ_UTC_TIMEZONE doesn't affect in
MergeOnReadInputFormat since the option isn't supported in
AvroToRowDataConverters
- //.option(FlinkOptions.READ_UTC_TIMEZONE, false)
+ .option(FlinkOptions.READ_UTC_TIMEZONE, true)
Review Comment:
The default value itself is true. Why do we need to set it explicitly in
test?
Can you also write a test with assertions on the record itself?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]