cloud-fan commented on code in PR #38595:
URL: https://github.com/apache/spark/pull/38595#discussion_r1019835019
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -3804,6 +3804,13 @@ class Dataset[T] private[sql](
} catch {
case _: ParseException => throw
QueryCompilationErrors.invalidViewNameError(viewName)
}
+
+ if (tableIdentifier.database.isDefined) {
+ throw new AnalysisException(
+ errorClass = "TEMP_VIEW_DOES_NOT_BELONG_TO_A_DATABASE",
Review Comment:
In the parser side, we have this
```
val tableIdentifier =
visitMultipartIdentifier(ctx.multipartIdentifier).asTableIdentifier
if (tableIdentifier.database.isDefined) {
// Temporary view names should NOT contain database prefix like
"database.table"
throw QueryParsingErrors
.notAllowedToAddDBPrefixForTempViewError(tableIdentifier.database.get, ctx)
}
```
shall we reuse the error class here?
--
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]