yihua commented on code in PR #12075:
URL: https://github.com/apache/hudi/pull/12075#discussion_r1797956767
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/SparkFileFormatInternalRowReaderContext.scala:
##########
@@ -87,17 +88,15 @@ class
SparkFileFormatInternalRowReaderContext(parquetFileReader: SparkParquetRea
}
val structType = HoodieInternalRowUtils.getCachedSchema(requiredSchema)
if (FSUtils.isLogFile(filePath)) {
- val projection =
HoodieInternalRowUtils.getCachedUnsafeProjection(structType, structType)
- new CloseableMappingIterator[InternalRow, UnsafeRow](
+ val dataSchemaWithMergeCol = if (hasRowIndexField) {
+ HoodiePositionBasedSchemaHandler.addPositionalMergeCol(dataSchema)
+ } else {
+ dataSchema
Review Comment:
In most cases we still need to read all columns for merging so this may be
OK. We should file a follow-up Jira to see how to fix the projection properly.
--
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]