MaxGekk commented on code in PR #41155:
URL: https://github.com/apache/spark/pull/41155#discussion_r1192953587
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -3233,6 +3225,14 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase {
messageParameters = Map.empty)
}
+ def ambiguousRelationAliasNameInNestedCTEError(name: String): Throwable = {
+ new AnalysisException(
+ errorClass = "_LEGACY_ERROR_TEMP_1348",
+ messageParameters = Map(
+ "name" -> name,
Review Comment:
Please, wrap it by `toSQLId`, please.
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -3783,6 +3783,12 @@
"Failed to execute command because subquery expressions are not allowed
in DEFAULT values."
]
},
+ "_LEGACY_ERROR_TEMP_1348" : {
+ "message" : [
+ "Name <name> is ambiguous in nested CTE.",
+ "Please set <config> to CORRECTED so that name defined in inner CTE
takes precedence. If set it to LEGACY, outer CTE definitions will take
precedence. See more details in SPARK-28228."
Review Comment:
> See more details in SPARK-28228.
It would be better to update the public docs and refer to them.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -3233,6 +3225,14 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase {
messageParameters = Map.empty)
}
+ def ambiguousRelationAliasNameInNestedCTEError(name: String): Throwable = {
+ new AnalysisException(
+ errorClass = "_LEGACY_ERROR_TEMP_1348",
+ messageParameters = Map(
+ "name" -> name,
+ "config" -> LEGACY_CTE_PRECEDENCE_POLICY.key))
Review Comment:
Use `toSQLConf`
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -3783,6 +3783,12 @@
"Failed to execute command because subquery expressions are not allowed
in DEFAULT values."
]
},
+ "_LEGACY_ERROR_TEMP_1348" : {
+ "message" : [
+ "Name <name> is ambiguous in nested CTE.",
+ "Please set <config> to CORRECTED so that name defined in inner CTE
takes precedence. If set it to LEGACY, outer CTE definitions will take
precedence. See more details in SPARK-28228."
Review Comment:
```suggestion
"Please set <config> to \"CORRECTED\" so that name defined in inner
CTE takes precedence. If set it to \"LEGACY\", outer CTE definitions will take
precedence. See more details in SPARK-28228."
```
--
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]