PaysonXu commented on code in PR #46320:
URL: https://github.com/apache/spark/pull/46320#discussion_r1763553285


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -3548,17 +3548,14 @@ private[sql] object QueryCompilationErrors extends 
QueryErrorsBase with Compilat
   }
 
   def failedToParseExistenceDefaultAsLiteral(fieldName: String, defaultValue: 
String): Throwable = {
-    new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1344",
-      messageParameters = Map(
-        "fieldName" -> fieldName,
-        "defaultValue" -> defaultValue))
+    SparkException.internalError(s"parse existence default as literal err," +

Review Comment:
   @MaxGekk @dtenedor In the latest modification, i removed 44  and the reasons 
are as follows, thank you for reviewing:
   1. the only usage of _LEGACY_ERROR_TEMP_1344 is 
ResolveDefaultColumns#getExistenceDefaultValues when AnalysisException or 
MatchError matched when call analyze. 
   2. AnalysisException thrown from analyze is already formatted(like 
INVALID_DEFAULT_VALUE.UNRESOLVED_EXPRESSION, 
INVALID_DEFAULT_VALUE.SUBQUERY_EXPRESSION) but was swallowed by 
_LEGACY_ERROR_TEMP_1344.
   3. MatchError can be considered a coding bug, so it is separated from 
AnalysisException as an internal error.



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to