Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/22785#discussion_r226978705
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala
---
@@ -187,7 +187,7 @@ object RowEncoder {
val convertedField = if (field.nullable) {
If(
Invoke(inputObject, "isNullAt", BooleanType, Literal(index) ::
Nil),
- Literal.create(null, field.dataType),
+ Literal.create(null, fieldValue.dataType),
--- End diff --
can we add a comment to explain it? `field.dataType` can be different from
`fieldValue.dataType`, because we strip UDT
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]