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

    https://github.com/apache/spark/pull/8228#discussion_r37147999
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/CatalystRowConverter.scala
 ---
    @@ -126,7 +169,24 @@ private[parquet] class CatalystRowConverter(
     
       // Converters for each field.
       private val fieldConverters: Array[Converter with 
HasParentContainerUpdater] = {
    -    parquetType.getFields.zip(catalystType).zipWithIndex.map {
    +    // In case of schema merging, `parquetType` can be a subset of 
`catalystType`.  We need to pad
    +    // those missing fields and create converters for them, although 
values of these fields are
    +    // always null.
    +    val paddedParquetFields = {
    +      val parquetFields = parquetType.getFields
    +      val parquetFieldNames = parquetFields.map(_.getName).toSet
    +      val missingFields = catalystType.filterNot(f => 
parquetFieldNames.contains(f.name))
    --- End diff --
    
    No. Currently reading Parquet metastore tables may introduce case 
sensitivity issue. But it's already reconciled within `ParquetRelation` before 
building the converters.


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