Skip to content

Commit c9ac0e9

Browse files
committed
[SPARK-11434][SPARK-11103][SQL] Fix test ": Filter applied on merged Parquet schema with new column fails"
https://issues.apache.org/jira/browse/SPARK-11434 Author: Yin Huai <[email protected]> Closes #9387 from yhuai/SPARK-11434. (cherry picked from commit 3c47188) Signed-off-by: Yin Huai <[email protected]>
1 parent 6b10ea5 commit c9ac0e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,15 @@ class ParquetFilterSuite extends QueryTest with ParquetTest with SharedSQLContex
323323
withSQLConf(SQLConf.PARQUET_FILTER_PUSHDOWN_ENABLED.key -> "true",
324324
SQLConf.PARQUET_SCHEMA_MERGING_ENABLED.key -> "true") {
325325
withTempPath { dir =>
326-
var pathOne = s"${dir.getCanonicalPath}/table1"
326+
val pathOne = s"${dir.getCanonicalPath}/table1"
327327
(1 to 3).map(i => (i, i.toString)).toDF("a", "b").write.parquet(pathOne)
328-
var pathTwo = s"${dir.getCanonicalPath}/table2"
328+
val pathTwo = s"${dir.getCanonicalPath}/table2"
329329
(1 to 3).map(i => (i, i.toString)).toDF("c", "b").write.parquet(pathTwo)
330330

331331
// If the "c = 1" filter gets pushed down, this query will throw an exception which
332332
// Parquet emits. This is a Parquet issue (PARQUET-389).
333333
checkAnswer(
334-
sqlContext.read.parquet(pathOne, pathTwo).filter("c = 1"),
334+
sqlContext.read.parquet(pathOne, pathTwo).filter("c = 1").selectExpr("c", "b", "a"),
335335
(1 to 1).map(i => Row(i, i.toString, null)))
336336
}
337337
}

0 commit comments

Comments
 (0)