From b5dac9390b9074a258cf0e74c890f38f6e6d9f0f Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Thu, 8 Aug 2024 13:32:51 -0600 Subject: [PATCH] chore: Remove legacy code for adding a cast to a coalesce (#790) --- .../scala/org/apache/comet/serde/QueryPlanSerde.scala | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala index 5f3cc7a2e..135ed15b9 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -2167,15 +2167,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim case a @ Coalesce(_) => val exprChildren = a.children.map(exprToProtoInternal(_, inputs)) - val childExpr = scalarExprToProto("coalesce", exprChildren: _*) - // TODO: Remove this once we have new DataFusion release which includes - // the fix: https://github.com/apache/arrow-datafusion/pull/9459 - if (childExpr.isDefined) { - castToProto(None, a.dataType, childExpr, CometEvalMode.LEGACY) - } else { - withInfo(expr, a.children: _*) - None - } + scalarExprToProto("coalesce", exprChildren: _*) // With Spark 3.4, CharVarcharCodegenUtils.readSidePadding gets called to pad spaces for // char types.