cshuo commented on code in PR #19502:
URL: https://github.com/apache/hudi/pull/19502#discussion_r3732965418
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedFileFormat.scala:
##########
@@ -314,21 +315,42 @@ class HoodieFileGroupReaderBasedFileFormat(tablePath:
String,
} else {
0
}
- val reader = HoodieFileGroupReader.builder()
- .withReaderContext(readerContext)
- .withHoodieTableMetaClient(metaClient)
- .withLatestCommitTime(queryTimestamp)
- .withBaseFileOption(fileSlice.getBaseFile)
- .withLogFiles(fileSlice.getLogFiles)
- .withPartitionPath(fileSlice.getPartitionPath)
- .withDataSchema(dataSchema)
- .withRequestedSchema(requestedSchema)
- .withInternalSchemaOpt(internalSchemaOpt)
- .withProps(props)
- .withStart(file.start)
- .withLength(baseFileLength)
- .withShouldUseRecordPosition(shouldUseRecordPosition)
- .build()
+ val reader: HoodieRecordReader[InternalRow] =
+ if (!metaClient.isMetadataTable &&
LsmReaderUtils.shouldUseLsmReader(
Review Comment:
Yes, the metadata-table check is unnecessary here. Spark MDT does not use
the LSM storage layout yet, so `shouldUseLsmReader` already returns false based
on the table configuration. MDT LSM support will be handled in a separate PR.
I’ve removed the explicit check.
--
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]