cshuo commented on code in PR #13971:
URL: https://github.com/apache/hudi/pull/13971#discussion_r2373910397


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/format/FlinkRecordContext.java:
##########
@@ -65,6 +68,16 @@ public FlinkRecordContext(HoodieTableConfig tableConfig, 
StorageConfiguration<?>
     this.utcTimezone = storageConf.getBoolean("read.utc-timezone",true);
   }
 
+  private FlinkRecordContext(boolean utcTimezone) {
+    super(new DefaultJavaTypeConverter());
+    this.utcTimezone = utcTimezone;
+  }
+
+  public static FlinkRecordContext getFieldAccessorInstance(Properties props) {
+    boolean utcTimezone = 
Boolean.parseBoolean(props.getProperty("read.utc-timezone","true"));
+    return utcTimezone ? FIELD_ACCESSOR_INSTANCE_WITH_UTC_ENABLE : 
FIELD_ACCESSOR_INSTANCE_WITH_UTC_DISABLE;

Review Comment:
   `utc-timezone` is only used for field with TIMESTAMP type.
   Considering `isDelete` checking, if we have assumption that custom delete 
field cannot be of TIMESTAMP type, we can use one instance here. Actually, it's 
generally of primitive type, like string. I'm ok to use one instance here.



-- 
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]

Reply via email to