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/18 08:16:12 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_r304788997
 
 

 ##########
 File path: external/avro/src/test/scala/org/apache/spark/sql/avro/AvroFunctionsSuite.scala
 ##########
 @@ -147,10 +147,55 @@ class AvroFunctionsSuite extends QueryTest with SharedSQLContext with SQLTestUti
       val df = Seq("one", "two", "three", "four").map(generateBinary(_, simpleSchema))
         .toDF()
         .withColumn("value",
-          functions.from_avro(col("value"), simpleSchema))
+          functions.from_avro(col("value"), simpleSchema, None))
 
       assert(df.queryExecution.executedPlan.isInstanceOf[LocalTableScanExec])
       assert(df.collect().map(_.get(0)) === Seq(Row("one"), Row("two"), Row("three"), Row("four")))
     }
   }
+
+  test("roundtrip in to_avro and from_avro with different compatible schemas") {
+    val df = spark.range(10).select(
+      struct(
 
 Review comment:
   this can go on a single line

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