yihua commented on code in PR #17573:
URL: https://github.com/apache/hudi/pull/17573#discussion_r2628726020


##########
hudi-spark-datasource/hudi-spark3.3.x/src/main/scala/org/apache/spark/sql/avro/AvroDeserializerInternal.scala:
##########
@@ -49,17 +51,17 @@ import scala.collection.JavaConverters._
  *
  * PLEASE REFRAIN MAKING ANY CHANGES TO THIS CODE UNLESS ABSOLUTELY NECESSARY
  */
-private[sql] class AvroDeserializer(rootAvroType: Schema,
+private[sql] class AvroDeserializerInternal(rootType: HoodieSchema,
                                     rootCatalystType: DataType,
                                     positionalFieldMatch: Boolean,
                                     datetimeRebaseSpec: RebaseSpec,
                                     filters: StructFilters) {
 
-  def this(rootAvroType: Schema,
+  def this(rootType: HoodieSchema,

Review Comment:
   @rahil-c I thought we want to keep the `AvroSerializer` and 
`AvroDeserializer` classes untouched and let Spark adapter class to pass in the 
Avro schema, to limit the less-valuable changes?
   ```
   override def createAvroSerializer(rootCatalystType: DataType, rootType: 
HoodieSchema, nullable: Boolean): HoodieAvroSerializer =
       new HoodieSpark3_3AvroSerializer(rootCatalystType, 
rootType.toAvroSchema, nullable)
   
     override def createAvroDeserializer(rootType: HoodieSchema, 
rootCatalystType: DataType): HoodieAvroDeserializer =
       new HoodieSpark3_3AvroDeserializer(rootType.toAvroSchema, 
rootCatalystType)
   ```



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