danny0405 commented on code in PR #14120:
URL: https://github.com/apache/hudi/pull/14120#discussion_r2450266051
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieParquetReadSupport.scala:
##########
@@ -35,16 +35,16 @@ class HoodieParquetReadSupport(
convertTz: Option[ZoneId],
enableVectorizedReader: Boolean,
datetimeRebaseSpec: RebaseSpec,
- int96RebaseSpec: RebaseSpec)
+ int96RebaseSpec: RebaseSpec,
+ tableSchemaOpt:
org.apache.hudi.common.util.Option[org.apache.parquet.schema.MessageType] =
org.apache.hudi.common.util.Option.empty())
extends ParquetReadSupport(convertTz, enableVectorizedReader,
datetimeRebaseSpec, int96RebaseSpec) with SparkAdapterSupport {
override def init(context: InitContext): ReadContext = {
val readContext = super.init(context)
- val requestedParquetSchema = readContext.getRequestedSchema
+ val requestedParquetSchema =
SchemaRepair.repairLogicalTypes(readContext.getRequestedSchema, tableSchemaOpt)
Review Comment:
can it be ensured that the `readContext.getRequestedSchema` coming from the
parquet footer?
--
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]