andygrove commented on code in PR #1053: URL: https://github.com/apache/datafusion-comet/pull/1053#discussion_r1829677888
########## spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala: ########## @@ -1086,155 +1086,67 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim None case EqualTo(left, right) => - val leftExpr = exprToProtoInternal(left, inputs) - val rightExpr = exprToProtoInternal(right, inputs) - - if (leftExpr.isDefined && rightExpr.isDefined) { - val builder = ExprOuterClass.Equal.newBuilder() - builder.setLeft(leftExpr.get) - builder.setRight(rightExpr.get) - - Some( - ExprOuterClass.Expr - .newBuilder() - .setEq(builder) - .build()) - } else { - withInfo(expr, left, right) - None + createBinaryExpr(left, right, inputs).map { builder => + ExprOuterClass.Expr + .newBuilder() + .setEq(builder) + .build() Review Comment: Hmm .. perhaps I could refactor farther so that the `map` receives an `ExprOuterClass.Expr.Builder` and then only has to call `setEq` in the map block. That would be more concise. I will try that as a follow on PR after https://github.com/apache/datafusion-comet/pull/1056 is merged -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org