yaooqinn commented on a change in pull request #28673:
URL: https://github.com/apache/spark/pull/28673#discussion_r432805797



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -105,9 +105,9 @@ trait DateTimeFormatterHelper {
   // between legacy parser and new parser. If new parser fails but legacy 
parser works, throw a
   // SparkUpgradeException. On the contrary, if the legacy policy set to 
CORRECTED,
   // DateTimeParseException will address by the caller side.
-  protected def checkDiffResult[T](
+  protected def checkDiffParserResult[T](
       s: String, legacyParseFunc: String => T): PartialFunction[Throwable, T] 
= {
-    case e: DateTimeException if SQLConf.get.legacyTimeParserPolicy == 
EXCEPTION =>
+    case e if needConvertToSparkUpgradeException(e) =>

Review comment:
       There could be such a risk for the parser to get it after roughly 
checked the JCL.




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

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