1fanwang commented on code in PR #20660:
URL: https://github.com/apache/hudi/pull/20660#discussion_r4703843944


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/mor/MergeOnReadInputFormat.java:
##########
@@ -257,6 +265,22 @@ public void close() throws IOException {
     this.closed = true;
   }
 
+  /**
+   * Returns the timeline timezone of the table. A streaming read can start 
before the table exists, so
+   * the table config is read on first use, and the default is returned while 
there is no table yet.
+   */
+  public HoodieTimelineTimeZone getTimelineTimeZone() {
+    if (timelineTimeZone == null) {
+      Option<HoodieTableConfig> tableConfig = StreamerUtil.getTableConfig(

Review Comment:
   Agreed, and fixed in 
https://github.com/apache/hudi/commit/ac6525924f41fe335dbb5bcb0717b7f62531bd25: 
open() now reuses the meta client getTimelineTimeZone already built for the 
first split, falling back to building a fresh one only when it was not already 
resolved, and still builds fresh on every later split as before. I verified 
this by reading the code path and a full compile; the existing test for this 
class needs the embedded timeline server, which does not run in my sandbox, so 
I could not exercise it directly 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