Ngone51 commented on issue #23651: [SPARK-26730][SQL] Strip redundant 
AssertNotNull for ExpressionEncoder's serializer
URL: https://github.com/apache/spark/pull/23651#issuecomment-458938962
 
 
   @viirya @cloud-fan 
   
   I checked the failed test and found that we could not just strip 
`AssertNotNull` in `Invoke`. Because for types like nested Tuple with current 
fix, e.g. `Tuple2(Int, Tuple2(String, Int))`, we will get 
   
   `Invoke(targetObject = Invoke(targetObject = 
AssertNotNull(BoundReference(input[0, scala.Tuple2, true])), functionName = 
"_2", dataType = ObjectType(scala.Tuple2)), functionName = "_2", dataType = 
IntegerType)` (as part of serializer).
   
   And it returns `nullable = true` for `IntegerType`, since the return value 
of the second `Invoke` may return `null` without an `AssertNotNull` wrapped on 
it. 

----------------------------------------------------------------
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]

Reply via email to