Github user gengliangwang commented on a diff in the pull request:
https://github.com/apache/spark/pull/21439#discussion_r192502051
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/JsonExpressionsSuite.scala
---
@@ -423,7 +423,9 @@ class JsonExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper with
val input = """{"a": 1}"""
val schema = ArrayType(StructType(StructField("a", IntegerType) ::
Nil))
val output = InternalRow(1) :: Nil
- checkEvaluation(JsonToStructs(schema, Map.empty, Literal(input),
gmtId, true), output)
+ checkEvaluation(
+ JsonToStructs(schema, Map("unpackArray" -> "true"), Literal(input),
gmtId, true),
--- End diff --
add case for `unpackArray` as `false`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]