gengliangwang commented on code in PR #37663:
URL: https://github.com/apache/spark/pull/37663#discussion_r955828967
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TryEval.scala:
##########
@@ -77,8 +77,13 @@ case class TryEval(child: Expression) extends
UnaryExpression with NullIntoleran
// scalastyle:on line.size.limit
case class TryAdd(left: Expression, right: Expression, replacement: Expression)
extends RuntimeReplaceable with InheritAnalysisRules {
- def this(left: Expression, right: Expression) =
- this(left, right, TryEval(Add(left, right, failOnError = true)))
+ def this(left: Expression, right: Expression) = this(left, right,
+ (left.dataType, right.dataType) match {
Review Comment:
From tests, yes.
--
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]