Fixes nullability of Attributes in a resolved LogicalPlan by using the nullability of
corresponding Attributes of its children output Attributes. This step is needed because
users can use a resolved AttributeReference in the Dataset API and outer joins
can change the nullability of an AttribtueReference. Without the fix, a nullable column's
nullable field can be actually set as non-nullable, which cause illegal optimization
(e.g., NULL propagation) and wrong answers.
See SPARK-13484 and SPARK-13801 for the concrete queries of this case.
Fixes nullability of Attributes in a resolved LogicalPlan by using the nullability of corresponding Attributes of its children output Attributes. This step is needed because users can use a resolved AttributeReference in the Dataset API and outer joins can change the nullability of an AttribtueReference. Without the fix, a nullable column's nullable field can be actually set as non-nullable, which cause illegal optimization (e.g., NULL propagation) and wrong answers. See SPARK-13484 and SPARK-13801 for the concrete queries of this case.