cloud-fan commented on code in PR #45822:
URL: https://github.com/apache/spark/pull/45822#discussion_r1549671898
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala:
##########
@@ -1235,11 +1235,13 @@ object TryToTimestampExpressionBuilder extends
ExpressionBuilder {
override def build(funcName: String, expressions: Seq[Expression]):
Expression = {
val numArgs = expressions.length
if (numArgs == 1 || numArgs == 2) {
- ParseToTimestamp(
+ // The expression ParseToTimestamp will throw an SparkUpgradeException
if the input is invalid
+ // even when failOnError is false. We need to catch the exception and
return null.
+ TryEval(ParseToTimestamp(
Review Comment:
This upgrade issue seems special and we should always throw it to provide
upgrade instructions. How about https://github.com/apache/spark/pull/45853 ?
--
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]