Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/19977#discussion_r158942832 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala --- @@ -645,11 +646,16 @@ object CombineConcats extends Rule[LogicalPlan] { stack.pop() match { case Concat(children) => stack.pushAll(children.reverse) + case Cast(Concat(children), StringType, _) => --- End diff -- Ah, I see. But, IIUC there is no chance where all the children of `Concat` have `Cast`s. If all inputs of `Concat` are binary, the parent `Concat` just concats binary inputs into a binary output (In this case, children need no `Cast`).
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org