Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19730#discussion_r151725673
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ---
    @@ -1039,13 +1039,19 @@ case class Cast(child: Expression, dataType: 
DataType, timeZoneId: Option[String
               }
             }
            """
    -    }.mkString("\n")
    +    }
    +    val fieldsEvalCodes = if (ctx.INPUT_ROW != null && ctx.currentVars == 
null) {
    +      ctx.splitExpressions(fieldsEvalCode, "castStruct",
    +        ("InternalRow", ctx.INPUT_ROW) :: (rowClass, result) :: 
("InternalRow", tmpRow) :: Nil)
    --- End diff --
    
    I mean, we don't need to pass in `ctx.INPUT_ROW` to the split functions.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to