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