viirya commented on a change in pull request #23651: [SPARK-26730][SQL] Strip
redundant AssertNotNull for ExpressionEncoder's serializer
URL: https://github.com/apache/spark/pull/23651#discussion_r252674158
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
##########
@@ -631,8 +631,7 @@ object ScalaReflection extends ScalaReflection {
"cannot be used as field name\n" + walkedTypePath.mkString("\n"))
}
- val fieldValue = Invoke(
- AssertNotNull(inputObject, walkedTypePath), fieldName,
dataTypeFor(fieldType),
Review comment:
Oh, I see. It can be explained by `AssertNotNull`'s doc:
```Note that there are cases where `child.nullable == true`, while we still
need to add this assertion...```
That is why the test case failed too...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]