Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/10964#discussion_r51225993 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala --- @@ -1463,4 +1463,11 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton { |FROM (SELECT '{"f1": "value1", "f2": 12}' json, 'hello' as str) test """.stripMargin), Row("value1", "12", BigDecimal("3.14"), "hello")) } + + test("SPARK-13056: Null in map value causes NPE") { + Seq((1, "abc=somestring,cba")).toDF("key", "value").registerTempTable("mapsrc") + sql("""CREATE TABLE maptest AS SELECT str_to_map(value, ",", "=") as col1 FROM mapsrc""") --- End diff -- The `str_to_map` stuff makes this test a little hard to read, can we create a `DataFrame` by `val df = Seq(1 -> Map("a" -> "1", "b" -> null)).toDF("key", "value")` and test it by DataFrames APIs directly?
--- 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