xiarixiaoyao commented on a change in pull request #2722:
URL: https://github.com/apache/hudi/pull/2722#discussion_r615214047



##########
File path: 
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieRealtimeInputFormatUtils.java
##########
@@ -218,6 +218,13 @@ public static void 
addRequiredProjectionFields(Configuration configuration) {
     addProjectionField(configuration, 
HoodieRecord.PARTITION_PATH_METADATA_FIELD, 
HoodieInputFormatUtils.HOODIE_PARTITION_PATH_COL_POS);
   }
 
+  public static boolean requiredProjectionFieldsExistInConf(Configuration 
configuration) {
+    String readColNames = 
configuration.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR, "");
+    return readColNames.contains(HoodieRecord.RECORD_KEY_METADATA_FIELD)
+        && readColNames.contains(HoodieRecord.COMMIT_TIME_METADATA_FIELD)
+        && readColNames.contains(HoodieRecord.PARTITION_PATH_METADATA_FIELD);

Review comment:
       see hudi will add these three fields for log reader
    
https://github.com/apache/hudi/blob/1d53d6e6c2d3ff967d333d87b308406c8cd6917a/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieRealtimeInputFormatUtils.java#L214,
 。   @garyli1019 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to