MaxGekk commented on code in PR #41338:
URL: https://github.com/apache/spark/pull/41338#discussion_r1207987147
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -2719,17 +2719,17 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase {
viewIdent: TableIdentifier,
newPath: Seq[TableIdentifier]): Throwable = {
new AnalysisException(
- errorClass = "_LEGACY_ERROR_TEMP_1281",
+ errorClass = "RECURSIVE_VIEW",
messageParameters = Map(
- "viewIdent" -> viewIdent.toString,
+ "viewIdent" -> toSQLId(viewIdent.nameParts),
"newPath" -> newPath.mkString(" -> ")))
}
def notAllowedToCreatePermanentViewWithoutAssigningAliasForExpressionError(
name: TableIdentifier,
attrName: String): Throwable = {
new AnalysisException(
- errorClass = "_LEGACY_ERROR_TEMP_1282",
+ errorClass = "CREATE_PERMANENT_VIEW_WITHOUT_ALIAS",
messageParameters = Map(
"name" -> name.toString,
"attrName" -> attrName))
Review Comment:
Please, quote both as ids using `toSQLId()`
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -269,6 +269,11 @@
],
"sqlState" : "22018"
},
+ "CREATE_PERMANENT_VIEW_WITHOUT_ALIAS" : {
+ "message" : [
+ "Not allowed to create a permanent view <name> without explicitly
assigning an alias for expression <attrName>."
Review Comment:
```suggestion
"Not allowed to create the permanent view <name> without explicitly
assigning an alias for the expression <attrName>."
```
--
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]