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/05/08 14:20:01 UTC

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

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

 ##########
 File path: external/avro/src/main/scala/org/apache/spark/sql/avro/package.scala
 ##########
 @@ -22,21 +22,24 @@ import org.apache.spark.annotation.Experimental
 package object avro {
 
   /**
-   * Converts a binary column of avro format into its corresponding catalyst value. The specified
-   * schema must match the read data, otherwise the behavior is undefined: it may fail or return
-   * arbitrary result.
+   * Converts a binary column of avro format into its corresponding catalyst value. If a writer's
+   * schema is provided, a different (but compatible) schema can be used for reading. If no writer's
+   * schema is provided, the specified schema must match the read data, otherwise the behavior is
+   * undefined: it may fail or return arbitrary result.
    *
    * @param data the binary column.
    * @param jsonFormatSchema the avro schema in JSON string format.
+   * @param writerJsonFormatSchema the avro schema in JSON string format used to serialize the data.
    *
    * @since 2.4.0
    */
   @Experimental
   @deprecated("Please use 'org.apache.spark.sql.avro.functions.from_avro' instead.", "3.0.0")
   def from_avro(
       data: Column,
-      jsonFormatSchema: String): Column =
-    org.apache.spark.sql.avro.functions.from_avro(data, jsonFormatSchema)
+      jsonFormatSchema: String,
 
 Review comment:
   we can avoid this change, since it is deprecated, can't we?

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