Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4826#discussion_r25597104
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetRelation.scala ---
    @@ -172,9 +173,14 @@ private[sql] object ParquetRelation {
           sqlContext.conf.parquetCompressionCodec.toUpperCase, 
CompressionCodecName.UNCOMPRESSED)
           .name())
         ParquetRelation.enableLogForwarding()
    -    ParquetTypesConverter.writeMetaData(attributes, path, conf)
    +    // This is a hack. We always set 
nullable/containsNull/valueContainsNull to true
    +    // for the schema of a parquet data.
    +    val schema =
    +      
DataType.alwaysNullable(StructType.fromAttributes(attributes)).asInstanceOf[StructType]
    --- End diff --
    
    Should also make `ParquetRelation2.schema` always nullable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to