Jonathancui123 commented on code in PR #37147: URL: https://github.com/apache/spark/pull/37147#discussion_r918421341
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala: ########## @@ -222,7 +226,11 @@ class UnivocityParser( } catch { case NonFatal(e) => // If fails to parse, then tries the way used in 2.0 and 1.x for backwards - // compatibility. + // compatibility only if no custom pattern has been set. If there is a custom pattern, + // fail since it may be different from the default pattern. + if (options.dateFormatInRead.isDefined) { + throw e + } Review Comment: This change makes sense to me -- 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