jonvex commented on code in PR #12317:
URL: https://github.com/apache/hudi/pull/12317#discussion_r1855551851


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodiePositionBasedSchemaHandler.java:
##########
@@ -82,9 +82,11 @@ private static InternalSchema 
addPositionalMergeCol(InternalSchema internalSchem
   @Override
   public Pair<List<Schema.Field>,List<Schema.Field>> 
getBootstrapRequiredFields() {
     Pair<List<Schema.Field>,List<Schema.Field>> dataAndMetaCols = 
super.getBootstrapRequiredFields();
-    if (readerContext.supportsParquetRowIndex()) {
-      if (!dataAndMetaCols.getLeft().isEmpty() && 
!dataAndMetaCols.getRight().isEmpty()) {
+    if (readerContext.supportsParquetRowIndex() && (this.needsBootstrapMerge 
|| this.needsMORMerge)) {

Review Comment:
   Previously we expected there to be a precombine if it was mor. So If you 
tried to just read meta cols, you would also still need to read the precombine 
so left and right would both have values. If you tried to only read data cols, 
you would also still read hoodie_record_key for mor merging in case we have to 
fall back to key based merging so left and right would also still both have 
values.
   
   Now that we don't require precombine field, If you only read the meta cols 
then you don't need to read any data cols. But we still want to do positional 
merging for mor, so we need to add the positional merge field 



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