Github user gengliangwang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22878#discussion_r229976669
  
    --- Diff: 
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala ---
    @@ -1374,4 +1377,185 @@ class AvroSuite extends QueryTest with 
SharedSQLContext with SQLTestUtils {
           |}
         """.stripMargin)
       }
    +
    +  test("generic record converts to row and back") {
    +    val nested =
    +      SchemaBuilder.record("simple_record").fields()
    +        .name("nested1").`type`("int").withDefault(0)
    +        .name("nested2").`type`("string").withDefault("string").endRecord()
    +    val mapDefault = new java.util.HashMap[String, String]()
    +    mapDefault.put("a", "A")
    +    val schema = SchemaBuilder.record("record").fields()
    --- End diff --
    
    We can use a json string to present the schema.


---

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

Reply via email to