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

    https://github.com/apache/spark/pull/7209#discussion_r34213538
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/parquet/ParquetSchemaSuite.scala 
---
    @@ -478,11 +478,12 @@ class ParquetSchemaSuite extends ParquetSchemaTest {
         StructType(Seq(
           StructField(
             "f1",
    -        ArrayType(IntegerType, containsNull = true),
    +        ArrayType(
    +          StructType(Seq(StructField("num", IntegerType))), containsNull = 
false),
    --- End diff --
    
    Figured out why the test passes. It's because `array` is considered as a 
special name by Parquet LIST backwards-compatibility [rule 3] [1] (this is 
specific to parquet-avro). Whenever we see a 2nd level group type named 
`array`, Parquet format spec see it as the element type. That's why it's 
inferred as a struct here.
    
    [1]: 
https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#backward-compatibility-rules


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