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/28 10:18:21 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #38754: [SPARK-41180][SQL] Reuse `INVALID_SCHEMA` instead of `_LEGACY_ERROR_TEMP_1227`

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala:
##########
@@ -160,8 +157,8 @@ object DataType {
         try {
           fallbackParser(schema)
         } catch {
-          case NonFatal(e2) =>
-            throw QueryCompilationErrors.failedFallbackParsingError(errorMsg, e1, e2)
+          case NonFatal(_) =>

Review Comment:
   Do you mean if `e2` is `NonFatal ` and `e1` is  `SparkThrowable`, then re-throw it,  and only call `QueryCompilationErrors.schemaFailToParseError` when e1 is not `SparkThrowable`?
   



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala:
##########
@@ -160,8 +157,8 @@ object DataType {
         try {
           fallbackParser(schema)
         } catch {
-          case NonFatal(e2) =>
-            throw QueryCompilationErrors.failedFallbackParsingError(errorMsg, e1, e2)
+          case NonFatal(_) =>

Review Comment:
   Do you mean if `e2` is `NonFatal ` and `e1` is  `SparkThrowable`, then re-throw it,  and only call `QueryCompilationErrors.schemaFailToParseError` when `e1` is not `SparkThrowable`?
   



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