Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19977#discussion_r157905624
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -642,15 +642,17 @@ object CombineConcats extends Rule[LogicalPlan] {
       private def flattenConcats(concat: Concat): Concat = {
         val stack = Stack[Expression](concat)
         val flattened = ArrayBuffer.empty[Expression]
    +    var isBinaryMode = concat.isBinaryMode
         while (stack.nonEmpty) {
           stack.pop() match {
    -        case Concat(children) =>
    +        case Concat(children, binary) =>
    +          isBinaryMode &= binary
    --- End diff --
    
    We need to update the comment of this optimizer rule to explain how 
`typeCoercionRules ` works for these nested cases.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to