codope commented on code in PR #12075:
URL: https://github.com/apache/hudi/pull/12075#discussion_r1802379874


##########
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
+      }
+      new CloseableMappingIterator[InternalRow, InternalRow](
         new 
HoodieSparkFileReaderFactory(storage).newParquetFileReader(filePath)
-          
.asInstanceOf[HoodieSparkParquetReader].getInternalRowIterator(dataSchema, 
requiredSchema),

Review Comment:
   Done, see https://github.com/apache/hudi/pull/12075#discussion_r1799578384



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