Skip to content

Commit 1f59072

Browse files
committed
Address PR comments
1 parent bc76fdf commit 1f59072

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)