Skip to content

Commit 045307b

Browse files
committed
SPARK-24348 + error message check
1 parent ec2e4a6 commit 045307b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,11 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
757757
Seq(Row("3"), Row(""), Row(null))
758758
)
759759

760-
intercept[AnalysisException] {
760+
val e = intercept[AnalysisException] {
761761
Seq(("a string element", 1)).toDF().selectExpr("element_at(_1, _2)")
762762
}
763+
assert(e.message.contains(
764+
"argument 1 requires (array or map) type, however, '`_1`' is of string type"))
763765
}
764766

765767
test("concat function - arrays") {

0 commit comments

Comments
 (0)