Skip to content

Commit 6526630

Browse files
committed
added additional unit test
1 parent 9f6a8ab commit 6526630

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,13 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
22662266
}
22672267
assert(ex2.getMessage.contains(
22682268
"The number of lambda function arguments '3' does not match"))
2269+
2270+
val ex3 = intercept[RuntimeException] {
2271+
dfExample3.selectExpr("transform_keys(x, (k, v) -> v)").show()
2272+
}
2273+
assert(ex3.getMessage.contains("Cannot use null as map key!"))
2274+
2275+
22692276
}
22702277

22712278
testInvalidLambdaFunctions()

0 commit comments

Comments
 (0)