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

    https://github.com/apache/spark/pull/16929#discussion_r104278176
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/JsonExpressionsSuite.scala
 ---
    @@ -372,6 +372,58 @@ class JsonExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
         )
       }
     
    +  test("from_json - array") {
    +    val schema = ArrayType(StructType(StructField("a", IntegerType) :: 
Nil))
    +
    +    // json array: `Array(Row(...), ...)`
    +    val jsonData1 = """[{"a": 1}, {"a": 2}]"""
    +    val expected =
    +      InternalRow.fromSeq(1 :: Nil) ::
    +      InternalRow.fromSeq(2 :: Nil) :: Nil
    +    checkEvaluation(JsonToStruct(
    +      schema, Map.empty, Literal(jsonData1), gmtId), expected)
    --- End diff --
    
    could you put input and expected output in different rows for readability 
please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to