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

    https://github.com/apache/spark/pull/8583#discussion_r38897017
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
 ---
    @@ -229,4 +232,322 @@ class ParquetQuerySuite extends QueryTest with 
ParquetTest with SharedSQLContext
           }
         }
       }
    +
    +  test("SPARK-10301 requested schema clipping - same schema") {
    +    withTempPath { dir =>
    +      val path = dir.getCanonicalPath
    +      val df = sqlContext.range(1).selectExpr("NAMED_STRUCT('a', id, 'b', 
id + 1) AS s").coalesce(1)
    +      df.write.parquet(path)
    +
    +      val userDefinedSchema =
    +        new StructType()
    +          .add(
    +            "s",
    +            new StructType()
    +              .add("a", LongType, nullable = true)
    +              .add("b", LongType, nullable = true),
    +            nullable = true)
    +
    +      checkAnswer(
    +        sqlContext.read.schema(userDefinedSchema).parquet(path),
    +        Row(Row(0L, 1L)))
    +    }
    +  }
    +
    +  ignore("SPARK-10301 requested schema clipping - schemas with disjoint 
sets of fields") {
    --- End diff --
    
    This test case is ignored because of a bug probably coming from parquet-mr 
side. I'm verifying this.


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