cloud-fan commented on code in PR #53129:
URL: https://github.com/apache/spark/pull/53129#discussion_r2630080965
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/GlobalTempViewManager.scala:
##########
@@ -49,15 +49,28 @@ class GlobalTempViewManager(database: String) {
}
/**
- * Creates a global temp view, or issue an exception if the view already
exists and
- * `overrideIfExists` is false.
+ * Creates a global temp view.
+ *
+ * Issue an `AnalysisException` when `ignoreIfExists` and `overrideIfExists`
both are true
+ * because they are mutually exclusive.
+ *
+ * If the view already exists: (1) when `ignoreIfExists` is ture, performs
no-op;
+ * (2) otherwise do replacement or issue an exception according to
`overrideIfExists`.
*/
def create(
name: String,
viewDefinition: TemporaryViewRelation,
+ ignoreIfExists: Boolean,
Review Comment:
shall we have an enum? there are 3 ifExists behaviors: ignore, overwrite,
and fail.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]