You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2015/11/02 07:41:08 UTC

[GitHub] spark pull request: [SPARK-11103][SQL] Filter applied on Merged Pa...

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

    https://github.com/apache/spark/pull/9327#discussion_r43600244
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala ---
    @@ -314,4 +314,24 @@ class ParquetFilterSuite extends QueryTest with ParquetTest with SharedSQLContex
           }
         }
       }
    +
    +  test("SPARK-11103: Filter applied on merged Parquet schema with new column fails") {
    +    import testImplicits._
    +
    +    withSQLConf(SQLConf.PARQUET_FILTER_PUSHDOWN_ENABLED.key -> "true",
    +      SQLConf.PARQUET_SCHEMA_MERGING_ENABLED.key -> "true") {
    +      withTempPath { dir =>
    +        var pathOne = s"${dir.getCanonicalPath}/table1"
    +        (1 to 3).map(i => (i, i.toString)).toDF("a", "b").write.parquet(pathOne)
    +        var pathTwo = s"${dir.getCanonicalPath}/table2"
    +        (1 to 3).map(i => (i, i.toString)).toDF("c", "b").write.parquet(pathTwo)
    +
    +        // If the "c = 1" filter gets pushed down, this query will throw an exception which
    +        // Parquet emits. This is a Parquet issue (PARQUET-389).
    +        checkAnswer(
    +          sqlContext.read.parquet(pathOne, pathTwo).filter("c = 1"),
    --- End diff --
    
    I see. I just wonder if the inconsistent order is another issue. I think users might think it is weird if they run the same script with `SELECT *` but the column order of the results are different every time they run.
    
    Could I open an issue for this if you think it is an separate issue?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org