yihua commented on code in PR #12843:
URL: https://github.com/apache/hudi/pull/12843#discussion_r2011113067


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReaderSchemaHandler.java:
##########
@@ -207,17 +213,22 @@ private static String[] 
getMandatoryFieldsForMerging(HoodieTableConfig cfg, Type
         requiredFields.addAll(Arrays.asList(fields.get()));
       }
     }
-
+    // Add precombine field for event time ordering merge mode.
     if (mergingConfigs.getLeft() == RecordMergeMode.EVENT_TIME_ORDERING) {
       String preCombine = cfg.getPreCombineField();
       if (!StringUtils.isNullOrEmpty(preCombine)) {
         requiredFields.add(preCombine);
       }
     }
-
+    // Add `HOODIE_IS_DELETED_FIELD` field if exists.
     if (dataSchema.getField(HoodieRecord.HOODIE_IS_DELETED_FIELD) != null) {
       requiredFields.add(HoodieRecord.HOODIE_IS_DELETED_FIELD);
     }
+    // Add custom delete key field if exists.
+    if (FileGroupRecordBuffer.hasCustomDeleteConfigs(props, dataSchema)) {
+      requiredFields.add(props.getProperty(DELETE_KEY));

Review Comment:
   Fixed.



##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -215,6 +215,19 @@ public ClosableIterator<T> getFileRecordIterator(
    */
   public abstract Object getValue(T record, Schema schema, String fieldName);
 
+  /**
+   * Cast to Java boolean value.
+   * If the object is not compatible with boolean type, throws.
+   */
+  public boolean castToBoolean(Object value) {

Review Comment:
   nit: This is only used in one place.  No need for a new API in reader 
context which can cause confusion.



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