giamo commented on issue #24405: [SPARK-27506][SQL] Allow deserialization of 
Avro data using compatible schemas
URL: https://github.com/apache/spark/pull/24405#issuecomment-542547484
 
 
   > A bit confused by the example provided:
   > 
   > ```
   > scala> val decodedDf1 = df1.select(from_avro(data = 'eventBytes, 
jsonFormatSchema = schema2, options = Map("writerSchema" -> schema1).asJava) as 
"decoded")
   > ```
   > 
   > So them `schema1` is provided as `writerSchema`, we use `schema1` to read 
avro bytes back? Isn't schema1 only 2 fields? Are you meant `schema2` here?
   
   The example is correct, `jsonFormatSchema` is the one used for 
deserialization, just as before.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to