vaibhawvipul commented on code in PR #471:
URL: https://github.com/apache/datafusion-comet/pull/471#discussion_r1618170030
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -1959,9 +1959,19 @@ object QueryPlanSerde extends Logging with
ShimQueryPlanSerde with CometExprShim
case UnaryMinus(child, _) =>
val childExpr = exprToProtoInternal(child, inputs)
+ val evalMode = SQLConf.get.ansiEnabled
+ val evalModeStr = evalMode match {
+ case bool: Boolean =>
+ // Spark 3.2 & 3.3 has ansiEnabled boolean
+ if (bool) "ANSI" else "LEGACY"
+ case _ =>
+ // Spark 3.4+ has EvalMode enum with values LEGACY, ANSI, and TRY
+ evalMode.toString
Review Comment:
I will do that in a different PR. That PR will move this logic to shims for
both Cast and UnaryMinus.
--
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]