jonvex commented on code in PR #13288:
URL: https://github.com/apache/hudi/pull/13288#discussion_r2180581848


##########
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:
   I don't see that anywhere
   ```
   /**
    * The timestamp type represents a time instant in microsecond precision.
    * Valid range is [0001-01-01T00:00:00.000000Z, 9999-12-31T23:59:59.999999Z] 
where
    * the left/right-bound is a date and time of the proleptic Gregorian
    * calendar in UTC+00:00.
    *
    * Please use the singleton `DataTypes.TimestampType` to refer the type.
    * @since 1.3.0
    */
   @Stable
   class TimestampType private() extends DatetimeType {
     /**
      * The default size of a value of the TimestampType is 8 bytes.
      */
     override def defaultSize: Int = 8
   
     private[spark] override def asNullable: TimestampType = this
   }
   
   /**
    * The companion case object and its class is separated so the companion 
object also subclasses
    * the TimestampType class. Otherwise, the companion object would be of type 
"TimestampType$"
    * in byte code. Defined with a private constructor so the companion object 
is the only possible
    * instantiation.
    *
    * @since 1.3.0
    */
   @Stable
   case object TimestampType extends TimestampType
   
   ```
   



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