manojpec commented on a change in pull request #3968:
URL: https://github.com/apache/hudi/pull/3968#discussion_r749730096



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/log/AbstractHoodieLogRecordReader.java
##########
@@ -151,6 +155,14 @@ protected AbstractHoodieLogRecordReader(FileSystem fs, 
String basePath, List<Str
     this.instantRange = instantRange;
     this.withOperationField = withOperationField;
     this.enableFullScan = enableFullScan;
+
+    // virtual keys handling
+    if (!tableConfig.populateMetaFields()) {
+      this.virtualKeysEnabled = true;
+      this.simpleKeyGenFields = Option.of(
+          Pair.of(tableConfig.getRecordKeyFieldProp(), 
tableConfig.getPartitionFieldProp()));
+    }
+    this.partitionName = partitionName;

Review comment:
       Right, we want partition name here.

##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/log/AbstractHoodieLogRecordReader.java
##########
@@ -170,10 +182,17 @@ public void scan(Option<List<String>> keys) {
     HoodieTimeline completedInstantsTimeline = 
commitsTimeline.filterCompletedInstants();
     HoodieTimeline inflightInstantsTimeline = 
commitsTimeline.filterInflights();
     try {
-      // iterate over the paths
+
+      // If virtual keys are enabled, set the key field accordingly.
+      String keyField = HoodieRecord.RECORD_KEY_METADATA_FIELD;
+      if (virtualKeysEnabled) {

Review comment:
       fixed.




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