nsivabalan commented on code in PR #13517:
URL: https://github.com/apache/hudi/pull/13517#discussion_r2219858083


##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -89,6 +93,39 @@ public static String getOrderingField(Properties properties) 
{
     return orderField;
   }
 
+  /**
+   * Returns whether event time watermark tracking is enabled.
+   */
+  public static boolean isTrackingEventTimeWatermark(Properties props) {
+    String payloadClass = getPayloadClass(props);
+    return (!StringUtils.isNullOrEmpty(payloadClass))

Review Comment:
   if we do the above as suggested, we will never hit this condition at all. 
   



##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -89,6 +93,39 @@ public static String getOrderingField(Properties properties) 
{
     return orderField;
   }
 
+  /**
+   * Returns whether event time watermark tracking is enabled.
+   */
+  public static boolean isTrackingEventTimeWatermark(Properties props) {
+    String payloadClass = getPayloadClass(props);
+    return (!StringUtils.isNullOrEmpty(payloadClass))
+        && payloadClass.equals(DefaultHoodieRecordPayload.class.getName());
+  }
+
+  /**
+   * Check if event time metadata should be tracked.
+   */
+  public static boolean shouldKeepEventTimeMetadata(TypedProperties props) {

Review Comment:
   we should keep the method name in sync w/ config name. 
   so, lets name this `shouldKeepEventTimeWatermark`



##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -89,6 +93,39 @@ public static String getOrderingField(Properties properties) 
{
     return orderField;
   }
 
+  /**
+   * Returns whether event time watermark tracking is enabled.
+   */
+  public static boolean isTrackingEventTimeWatermark(Properties props) {

Review Comment:
   We need another ticket generally in v9 table creatiion. 
   for new table creation, we should automatically map the payload to merge 
mode properties and proceed w/ table creation. 
   in other words, the hoodie.properties should only contain the intended new 
merge related properties. 
   Also, the `HoodieTableConfig.inferCorrectMergingBehavior` should ever happen 
for v9 tables. this should only kick in for v8 and below. 
   



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