MaxGekk commented on code in PR #36163:
URL: https://github.com/apache/spark/pull/36163#discussion_r851777295
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1930,11 +1930,17 @@ object QueryCompilationErrors {
}
def descPartitionNotAllowedOnTempView(table: String): Throwable = {
- new AnalysisException(s"DESC PARTITION is not allowed on a temporary view:
$table")
+ new AnalysisException(
+ errorClass = "FORBIDDEN_OPERATION",
+ messageParameters =
+ Array(toSQLStmt("DESC PARTITION"), "the temporary view",
toSQLValue(table)))
}
def descPartitionNotAllowedOnView(table: String): Throwable = {
- new AnalysisException(s"DESC PARTITION is not allowed on a view: $table")
+ new AnalysisException(
+ errorClass = "FORBIDDEN_OPERATION",
+ messageParameters = Array(
+ toSQLStmt("DESC PARTITION"), "the view", toSQLValue(table)))
Review Comment:
`table` is not a value, please, use `toSQLId` instead of `toSQLValue`
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1930,11 +1930,17 @@ object QueryCompilationErrors {
}
def descPartitionNotAllowedOnTempView(table: String): Throwable = {
- new AnalysisException(s"DESC PARTITION is not allowed on a temporary view:
$table")
+ new AnalysisException(
+ errorClass = "FORBIDDEN_OPERATION",
+ messageParameters =
+ Array(toSQLStmt("DESC PARTITION"), "the temporary view",
toSQLValue(table)))
Review Comment:
Please, use `toSQLId` instead of `toSQLValue`, see
https://github.com/apache/spark/pull/36210
--
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]