Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/9327#discussion_r43487583
--- 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)
--- End diff --
Several nits here, but I'm going to merge this one first since 1.5.2rc2 is
being cut soon.
- Please use `val` instead of `var` here.
- To construct the test DF, the following way is more preferable for better
readability:
```scala
sqlContext.range(3).select('id as 'c, 'id cast StringType as 'b)
```
or
```scala
sqlContext.range(3).selectExpr("id AS c", "CAST(id AS STRING) AS b")
```
---
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]