You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dengziming (via GitHub)" <gi...@apache.org> on 2023/10/18 02:15:50 UTC

[PR] [SPARK-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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

   [SPARK-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153
   
   ### What changes were proposed in this pull request?
   Assign the name `UNEXPECTED_SERIALIZER_FOR_CLASS` to the legacy error class `_LEGACY_ERROR_TEMP_2153`.
   
   ### Why are the changes needed?
   To assign proper name as a part of activity in SPARK-37935.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, the error message will include the error class name
   
   ### How was this patch tested?
   Add a unit test to produce the error from user code.
   
   ### 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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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

   +1, LGTM. Merging to master.
   Thank you, @dengziming.


-- 
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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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

   Thank you @MaxGekk for your review, the CI attempt-2 seems fine and some failures of attempt-1 is unrelated.


-- 
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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -1362,7 +1362,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE
   def classHasUnexpectedSerializerError(
       clsName: String, objSerializer: Expression): SparkRuntimeException = {
     new SparkRuntimeException(
-      errorClass = "_LEGACY_ERROR_TEMP_2153",
+      errorClass = "UNEXPECTED_SERIALIZER_FOR_CLASS",
       messageParameters = Map(
         "clsName" -> clsName,
         "objSerializer" -> objSerializer.toString()))

Review Comment:
   Could you quote the expression by `toSQLExpr`



-- 
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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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

   @dengziming Please, correct the JIRA to vhttps://issues.apache.org/jira/browse/SPARK-45573


-- 
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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #43414: [SPARK-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153
URL: https://github.com/apache/spark/pull/43414


-- 
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-45569][SQL] Assign name to the error _LEGACY_ERROR_TEMP_2153 [spark]

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


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3015,6 +3015,12 @@
     ],
     "sqlState" : "4274K"
   },
+  "UNEXPECTED_SERIALIZER_FOR_CLASS" : {
+    "message" : [
+      "Class <clsName> has unexpected serializer: <objSerializer>."

Review Comment:
   ```suggestion
         "The class <className> has an unexpected expression serializer. Expects \"STRUCT\" or \"IF\" which returns \"STRUCT\" but found <expr>."
   ```



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