Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/19827#discussion_r153234263 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala --- @@ -167,9 +160,20 @@ object GenerateUnsafeProjection extends CodeGenerator[Seq[Expression], UnsafePro } } + val writeFieldsCode = if (isTopLevel && row == null) { --- End diff -- for top level struct, the input is `ctx.INPUT_ROW`, which may be null.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org