MaxGekk commented on code in PR #44355:
URL: https://github.com/apache/spark/pull/44355#discussion_r1427853525


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -611,7 +611,7 @@ private[sql] object QueryCompilationErrors extends 
QueryErrorsBase with Compilat
 
   def functionWithUnsupportedSyntaxError(prettyName: String, syntax: String): 
Throwable = {
     new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1023",
+      errorClass = "INVALID_SQL_SYNTAX.FUNCTION_WITH_UNSUPPORTED_SYNTAX",
       messageParameters = Map("prettyName" -> prettyName, "syntax" -> syntax))

Review Comment:
   Please, quote `prettyName`:
   ```suggestion
         messageParameters = Map("prettyName" -> toSQLId(prettyName), "syntax" 
-> syntax))
   ```



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -2229,6 +2229,11 @@
           "Partition key <partKey> must set value."
         ]
       },
+      "FUNCTION_WITH_UNSUPPORTED_SYNTAX" : {
+        "message" : [
+          "Function <prettyName> does not support <syntax>."

Review Comment:
   ```suggestion
             "The function <prettyName> does not support <syntax>."
   ```



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -611,7 +611,7 @@ private[sql] object QueryCompilationErrors extends 
QueryErrorsBase with Compilat
 
   def functionWithUnsupportedSyntaxError(prettyName: String, syntax: String): 
Throwable = {
     new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1023",
+      errorClass = "INVALID_SQL_SYNTAX.FUNCTION_WITH_UNSUPPORTED_SYNTAX",
       messageParameters = Map("prettyName" -> prettyName, "syntax" -> syntax))

Review Comment:
   And wrap `syntax` by `toSQLStmt`



-- 
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]

Reply via email to