You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/01 05:52:47 UTC

[GitHub] gatorsmile commented on a change in pull request #23719: [SPARK-26808][SQL] Pruned schema should not change nullability

gatorsmile commented on a change in pull request #23719: [SPARK-26808][SQL] Pruned schema should not change nullability
URL: https://github.com/apache/spark/pull/23719#discussion_r252939587
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaPruning.scala
 ##########
 @@ -280,7 +280,7 @@ private[sql] object ParquetSchemaPruning extends Rule[LogicalPlan] {
           val leftFieldType = leftStruct(fieldName).dataType
           val rightFieldType = rightStruct(fieldName).dataType
           val sortedLeftFieldType = sortLeftFieldsByRight(leftFieldType, rightFieldType)
-          StructField(fieldName, sortedLeftFieldType)
+          StructField(fieldName, sortedLeftFieldType, nullable = leftStruct(fieldName).nullable)
 
 Review comment:
   add an assert in the testing mode to ensure left and right are the same

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org