codope commented on code in PR #10007:
URL: https://github.com/apache/hudi/pull/10007#discussion_r1385970457
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/NewHoodieParquetFileFormat.scala:
##########
@@ -74,11 +76,25 @@ class NewHoodieParquetFileFormat(tableState:
Broadcast[HoodieTableState],
override def supportBatch(sparkSession: SparkSession, schema: StructType):
Boolean = {
if (!supportBatchCalled) {
supportBatchCalled = true
- supportBatchResult = !isMOR && super.supportBatch(sparkSession, schema)
+ supportBatchResult = !isMOR && legacyFF.supportBatch(sparkSession,
schema)
}
supportBatchResult
}
+ private def wrapWithBatchConverter(reader: PartitionedFile =>
Iterator[InternalRow]): PartitionedFile => Iterator[InternalRow] = {
Review Comment:
why is this needed? i think the flatmap per row could incur some significant
cost for a large batch. Instead of wrapping everytime, can it be guarded for
some cases such as when schema on read is enabled?
--
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]