the-other-tim-brown commented on code in PR #13288:
URL: https://github.com/apache/hudi/pull/13288#discussion_r2094633434
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -152,8 +153,8 @@ class
HoodieFileGroupReaderBasedParquetFileFormat(tablePath: String,
// schema that we want fg reader to output to us
val requestedSchema = StructType(requiredSchema.fields ++
partitionSchema.fields.filter(f => mandatoryFields.contains(f.name)))
- val requestedAvroSchema =
AvroConversionUtils.convertStructTypeToAvroSchema(requestedSchema,
sanitizedTableName)
- val dataAvroSchema =
AvroConversionUtils.convertStructTypeToAvroSchema(dataSchema,
sanitizedTableName)
+ val requestedAvroSchema =
HoodieAvroUtils.repairSchema(AvroConversionUtils.convertStructTypeToAvroSchema(requestedSchema,
sanitizedTableName), avroTableSchema)
Review Comment:
Instead of constructing a schema that needs repair, is it possible to just
incorporate this into the initial conversion?
--
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]