File tree Expand file tree Collapse file tree
sql/core/src/test/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,13 +142,13 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
142142 assertNoSuchTable(s " ALTER TABLE $viewName RECOVER PARTITIONS " )
143143
144144 // For v2 ALTER TABLE statements, we have better error message saying view is not supported.
145- assertAnalysisExceptionThrown (
145+ assertAnalysisError (
146146 s " ALTER TABLE $viewName SET LOCATION '/path/to/your/lovely/heart' " ,
147147 s " ' $viewName' is a view not a table " )
148148
149149 // For the following v2 ALERT TABLE statements, unsupported operations are checked first
150150 // before resolving the relations.
151- assertAnalysisExceptionThrown (
151+ assertAnalysisError (
152152 s " ALTER TABLE $viewName PARTITION (a='4') SET LOCATION '/path/to/home' " ,
153153 " ALTER TABLE SET LOCATION does not support partition for v2 tables" )
154154 }
@@ -184,7 +184,7 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
184184 }
185185 }
186186
187- private def assertAnalysisExceptionThrown (query : String , message : String ): Unit = {
187+ private def assertAnalysisError (query : String , message : String ): Unit = {
188188 val e = intercept[AnalysisException ](sql(query))
189189 assert(e.message.contains(message))
190190 }
You can’t perform that action at this time.
0 commit comments