You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/05 09:24:30 UTC
[GitHub] [spark] linhongliu-db commented on a change in pull request #33204: [SPARK-36011][SQL] Disallow altering permanent views based on temporary views or UDFs
linhongliu-db commented on a change in pull request #33204:
URL: https://github.com/apache/spark/pull/33204#discussion_r663776384
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
##########
@@ -910,4 +910,20 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
}
}
}
+
+ test("SPARK-18217: Disallow altering permanent views based on temporary views") {
Review comment:
let's move this to `PersistedViewTestSuite`
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -258,7 +258,9 @@ case class AlterViewAsCommand(
def markAsAnalyzed(): LogicalPlan = copy(isAnalyzed = true)
override def run(session: SparkSession): Seq[Row] = {
- if (session.sessionState.catalog.isTempView(name)) {
+ val isTemporary = session.sessionState.catalog.isTempView(name)
+ verifyTemporaryObjectsNotExists(session.sessionState.catalog, isTemporary, name, query)
Review comment:
there is a `verifyAutoGeneratedAliasesNotExists` in the latest master code. could you put them together?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org