You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/26 10:30:35 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38754: [SPARK-41180][SQL] Assign an error class to "Cannot parse the data type"

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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -641,6 +641,12 @@
     ],
     "sqlState" : "42000"
   },
+  "INVALID_DATA_TYPE_SCHEMA" : {

Review Comment:
   We already have the error class `INVALID_SCHEMA`. Can you re-use it or make it more generic? cc @srielau 



##########
sql/core/src/test/resources/sql-tests/results/csv-functions.sql.out:
##########
@@ -43,7 +43,7 @@ struct<>
 -- !query output
 org.apache.spark.sql.AnalysisException
 {
-  "errorClass" : "_LEGACY_ERROR_TEMP_1227",
+  "errorClass" : "INVALID_DATA_TYPE_SCHEMA",
   "messageParameters" : {
     "e1" : "\n[PARSE_SYNTAX_ERROR] Syntax error at or near 'InvalidType': extra input 'InvalidType'(line 1, pos 2)\n\n== SQL ==\na InvalidType\n--^^^\n",

Review Comment:
   How about to unwrap this error? When both attempts fail, just bypass the first one to users.



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