Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/9327#discussion_r43683918
--- 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 --
@HyukjinKwon It will be weird if the column ordering of
`sqlContext.read.parquet(pathOne, pathTwo)` is not deterministic. Can you try
it out and see if it is the case?
---
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]