Skip to content

Commit 6ef0f45

Browse files
committed
ready for review
1 parent 49401b1 commit 6ef0f45

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/JsonExpressionsSuite.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@ class JsonExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
376376
)
377377
}
378378

379+
test("SPARK-19543: from_json empty input column") {
380+
val schema = StructType(StructField("a", IntegerType) :: Nil)
381+
checkEvaluation(
382+
JsonToStruct(schema, Map.empty, Literal.create(" ", StringType)),
383+
null
384+
)
385+
}
386+
379387
test("to_json") {
380388
val schema = StructType(StructField("a", IntegerType) :: Nil)
381389
val struct = Literal.create(create_row(1), schema)

0 commit comments

Comments
 (0)