You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/17 16:31:41 UTC

[GitHub] [spark] gengliangwang commented on a change in pull request #24405: [SPARK-27506][SQL] Allow deserialization of Avro data using compatible schemas

gengliangwang commented on a change in pull request #24405: [SPARK-27506][SQL] Allow deserialization of Avro data using compatible schemas
URL: https://github.com/apache/spark/pull/24405#discussion_r304519989
 
 

 ##########
 File path: external/avro/src/main/scala/org/apache/spark/sql/avro/AvroDataToCatalyst.scala
 ##########
 @@ -53,7 +54,9 @@ case class AvroDataToCatalyst(
 
   @transient private lazy val avroSchema = new Schema.Parser().parse(jsonFormatSchema)
 
-  @transient private lazy val reader = new GenericDatumReader[Any](avroSchema)
+  @transient private lazy val reader = writerJsonFormatSchema
 
 Review comment:
   So either writerJsonFormatSchema or jsonFormatSchema is used. In such case, if writerJsonFormatSchema is present, why not set writerJsonFormatSchema as jsonFormatSchema without changing the API?
   Could you explain more how the API is called?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org