zhli1142015 commented on code in PR #5985:
URL: https://github.com/apache/incubator-gluten/pull/5985#discussion_r1628713141


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionConverter.scala:
##########
@@ -563,18 +563,68 @@ object ExpressionConverter extends SQLConfHelper with 
Logging {
           arrayTransform
         )
       case tryEval @ TryEval(a: Add) =>
-        BackendsApiManager.getSparkPlanExecApiInstance.genTryAddTransformer(
+        
BackendsApiManager.getSparkPlanExecApiInstance.genTryArithmeticTransformer(
           substraitExprName,
           replaceWithExpressionTransformerInternal(a.left, attributeSeq, 
expressionsMap),
           replaceWithExpressionTransformerInternal(a.right, attributeSeq, 
expressionsMap),
-          tryEval
+          tryEval,
+          ExpressionNames.CHECK_ADD
+        )

Review Comment:
   Before spark 3.4 try_add is convert to `TryEval(Add(failOnError = true))`, 
after 3.4 it is converted to Add(EvalMode.TRY), and try-catch logic is executed 
in 
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala#L365.
 I think both have same semantic: return null when error happens.
   



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

Reply via email to