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

    https://github.com/apache/spark/pull/19730#discussion_r151476367
  
    --- 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 --
    
    what about inner struct? I think we should use `evPrim` here instead of 
`ctx.INPUT_ROW`.


---

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

Reply via email to