diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/ExecuteImmediateEndToEndSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/ExecuteImmediateEndToEndSuite.scala index 6b0f0b5582dc..cae22eda32f8 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/ExecuteImmediateEndToEndSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/ExecuteImmediateEndToEndSuite.scala @@ -50,7 +50,7 @@ class ExecuteImmediateEndToEndSuite extends QueryTest with SharedSparkSession { } checkError( - exception = intercept[ParseException](sql(query).collect()), + exception = e, errorClass = "FAILED_TO_PARSE_TOO_COMPLEX", parameters = Map(), context = ExpectedContext(