jayzhan211 commented on code in PR #14519:
URL: https://github.com/apache/datafusion/pull/14519#discussion_r1945670750


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -689,7 +693,7 @@ impl DefaultPhysicalPlanner {
                         if physical_field.data_type() != 
logical_field.data_type() {
                             differences.push(format!("field data type at index 
{} [{}]: (physical) {} vs (logical) {}", i, physical_field.name(), 
physical_field.data_type(), logical_field.data_type()));
                         }
-                        if physical_field.is_nullable() != 
logical_field.is_nullable() {
+                        if physical_field.is_nullable() && 
!logical_field.is_nullable() {

Review Comment:
   Likely only a few cases like Union is exception, most of the case doesn't 
change nullability



##########
datafusion/core/src/physical_planner.rs:
##########
@@ -689,7 +693,7 @@ impl DefaultPhysicalPlanner {
                         if physical_field.data_type() != 
logical_field.data_type() {
                             differences.push(format!("field data type at index 
{} [{}]: (physical) {} vs (logical) {}", i, physical_field.name(), 
physical_field.data_type(), logical_field.data_type()));
                         }
-                        if physical_field.is_nullable() != 
logical_field.is_nullable() {
+                        if physical_field.is_nullable() && 
!logical_field.is_nullable() {

Review Comment:
   Likely only a few case like Union is exception, most of the case doesn't 
change nullability



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to