Skip to content

Commit

Permalink
chore: Remove legacy code for adding a cast to a coalesce (apache#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove authored Aug 8, 2024
1 parent 457d9d1 commit b5dac93
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b5dac93

Please sign in to comment.