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

    https://github.com/apache/spark/pull/14957#discussion_r77757859
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
 ---
    @@ -571,6 +571,44 @@ class ParquetQuerySuite extends QueryTest with 
ParquetTest with SharedSQLContext
         }
       }
     
    +  test("SPARK-4502 parquet nested fields pruning") {
    +    // Schema of "test-data/nested-array-struct.parquet":
    +    //    root
    +    //    |-- primitive: integer (nullable = true)
    +    //    |-- myComplex: array (nullable = true)
    +    //    |    |-- element: struct (containsNull = true)
    +    //    |    |    |-- id: integer (nullable = true)
    +    //    |    |    |-- repeatedMessage: array (nullable = true)
    +    //    |    |    |    |-- element: struct (containsNull = true)
    +    //    |    |    |    |    |-- someId: integer (nullable = true)
    +    val df = 
readResourceParquetFile("test-data/nested-array-struct.parquet")
    +    df.createOrReplaceTempView("tmp_table")
    +    // normal test
    +    val query1 = "select primitive,myComplex[0].id from tmp_table"
    +    val result1 = sql(query1)
    +    withSQLConf(SQLConf.PARQUET_NEST_COLUMN_PRUNING.key -> "true") {
    +      checkAnswer(sql(query1), result1)
    --- End diff --
    
    Does this really test if the nested fields are pruned? I think this test 
will pass regardless of the newly added option.


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