wombatu-kun commented on code in PR #19389:
URL: https://github.com/apache/hudi/pull/19389#discussion_r3664751206


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/lsm/HoodieLsmFileGroupReader.java:
##########
@@ -167,15 +161,18 @@ private HoodieLsmFileGroupReader(
       throw new IllegalArgumentException("LSM file group reader is doing log 
file merge but not reading from the start of the base file");
     }
     HoodieTableConfig tableConfig = hoodieTableMetaClient.getTableConfig();
-    this.props = ConfigUtils.getMergeProps(props, tableConfig);
-    readerContext.initRecordMerger(props);
+    // The table's record merge properties are only readable once un-prefixed, 
and read-path callers pass their
+    // properties through untouched. Everything downstream must therefore use 
the merged set, not the parameter.
+    TypedProperties mergedProps = ConfigUtils.getMergeProps(props, 
tableConfig);
+    this.props = mergedProps;
+    readerContext.initRecordMerger(mergedProps);
     readerContext.setTablePath(tablePath);
     readerContext.setLatestCommitTime(latestCommitTime);
     readerContext.setShouldMergeUseRecordPosition(false);
     
readerContext.setHasBootstrapBaseFile(inputSplit.getBaseFileOption().flatMap(HoodieBaseFile::getBootstrapBaseFile).isPresent());
     
readerContext.setSchemaHandler(readerContext.getRecordContext().supportsParquetRowIndex()
-        ? new ParquetRowIndexBasedSchemaHandler<>(readerContext, dataSchema, 
requestedSchema, internalSchemaOpt, props, metaClient)
-        : new FileGroupReaderSchemaHandler<>(readerContext, dataSchema, 
requestedSchema, internalSchemaOpt, props, metaClient));
+        ? new ParquetRowIndexBasedSchemaHandler<>(readerContext, dataSchema, 
requestedSchema, internalSchemaOpt, mergedProps, metaClient)

Review Comment:
   Done bfd05722900a, though not by renaming: the param name is what Lombok's 
`@Builder` derives the setter from, so `oriProps` would rename `withProps()` 
and break its 28 call sites. Reassigning the param in place is a two-line diff 
against master and gets the same result.
   



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