danny0405 commented on code in PR #19389:
URL: https://github.com/apache/hudi/pull/19389#discussion_r3664597794
##########
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:
for minimal changes, can we rename the param as oriProps
--
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]