Skip to content

Commit f5559f4

Browse files
committed
Improvement test.
1 parent ff8dcc1 commit f5559f4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,18 @@ class ParquetFilterSuite extends QueryTest with ParquetTest with SharedSQLContex
10211021
}
10221022
}
10231023
}
1024+
1025+
test("SPARK-25206: wrong records are returned when Hive metastore schema and parquet schema " +
1026+
"are in different letter cases") {
1027+
withTempPath { path =>
1028+
val data = spark.range(1, 10).toDF("id")
1029+
data.write.parquet(path.getCanonicalPath)
1030+
withTable("SPARK_25206") {
1031+
sql(s"CREATE TABLE SPARK_25206 (ID LONG) USING parquet LOCATION '${path.getCanonicalPath}'")
1032+
checkAnswer(sql("select id from SPARK_25206 where id > 0"), data)
1033+
}
1034+
}
1035+
}
10241036
}
10251037

10261038
class NumRowGroupsAcc extends AccumulatorV2[Integer, Integer] {

0 commit comments

Comments
 (0)