MaxGekk commented on a change in pull request #26317: [SPARK-29628] Forcibly
create a temporary view in CREATE VIEW if referencing a temporary view
URL: https://github.com/apache/spark/pull/26317#discussion_r340543842
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -110,38 +110,44 @@ case class CreateViewCommand(
private def isTemporary = viewType == LocalTempView || viewType ==
GlobalTempView
- // Disallows 'CREATE TEMPORARY VIEW IF NOT EXISTS' to be consistent with
'CREATE TEMPORARY TABLE'
- if (allowExisting && isTemporary) {
- throw new AnalysisException(
- "It is not allowed to define a TEMPORARY view with IF NOT EXISTS.")
- }
+ if(isTemporary) verifyTempView()
Review comment:
```suggestion
if (isTemporary) verifyTempView()
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]