You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/12/14 13:22:21 UTC

[PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

beliefer opened a new pull request, #44355:
URL: https://github.com/apache/spark/pull/44355

   ### What changes were proposed in this pull request?
   Based on the suggestion at https://github.com/apache/spark/pull/43910#discussion_r1412089938, this PR want assign a name to the error class `_LEGACY_ERROR_TEMP_1023`.
   
   
   ### Why are the changes needed?
   Assign a name to the error class `_LEGACY_ERROR_TEMP_1023`.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   
   
   ### How was this patch tested?
   N/A
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   'No'.
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer closed pull request #44355: [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023
URL: https://github.com/apache/spark/pull/44355


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #44355:
URL: https://github.com/apache/spark/pull/44355#issuecomment-1857367375

   The GA failure is unrelated.
   @MaxGekk Do you have time to take a review?


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #44355:
URL: https://github.com/apache/spark/pull/44355#issuecomment-1859005855

   The GA failure is unrelated.
   Merged to master.
   @MaxGekk Thank you!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #44355:
URL: https://github.com/apache/spark/pull/44355#discussion_r1427873508


##########
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:
   HaHa! I forgot it.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46406][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1023 [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #44355:
URL: https://github.com/apache/spark/pull/44355#discussion_r1426713755


##########
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:
   @MaxGekk I putted the `FUNCTION_WITH_UNSUPPORTED_SYNTAX` below `INVALID_SQL_SYNTAX`.
   Is it suitable?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org