hudi-agent commented on code in PR #19822:
URL: https://github.com/apache/hudi/pull/19822#discussion_r4080876428
##########
hudi-spark-datasource/hudi-spark4.0.x/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark40LegacyHoodieParquetFileFormat.scala:
##########
@@ -152,10 +152,11 @@ class Spark40LegacyHoodieParquetFileFormat(private val
shouldAppendPartitionValu
val datetimeRebaseModeInRead = parquetOptions.datetimeRebaseModeInRead
val int96RebaseModeInRead = parquetOptions.int96RebaseModeInRead
val timeZoneId = Option(sqlConf.sessionLocalTimeZone)
- // Should always be set by FileSourceScanExec creating this.
- // Check conf before checking option, to allow working around an issue by
changing conf.
+ // Respect the plan-time OPTION_RETURNING_BATCH decision when present,
instead of recomputing it here.
val returningBatch =
sparkSession.sessionState.conf.parquetVectorizedReaderEnabled &&
Review Comment:
🤖 The spark3-common version gates this on `enableVectorizedReader &&`, but
here it's only `parquetVectorizedReaderEnabled &&`. Previously the
`supportsColumnar(resultSchema)` fallback implied `supportBatch(resultSchema)`
(== `enableVectorizedReader`), so the guard was implicit; with the option path
it isn't. If the plan says `true` but `enableVectorizedReader` is false
(resultSchema = partitionSchema ++ requiredSchema is a superset of the plan's
output schema), the reader takes the row branch while the plan expects
columnar. Could you mirror the `enableVectorizedReader &&` guard here (and in
4.1/4.2)?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]