jaceklaskowski commented on a change in pull request #24327: [SPARK-27418][SQL]
Migrate Parquet to File Data Source V2
URL: https://github.com/apache/spark/pull/24327#discussion_r279136736
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala
##########
@@ -172,15 +172,17 @@ class PlannerSuite extends SharedSQLContext {
}
test("SPARK-11390 explain should print PushedFilters of PhysicalRDD") {
- withTempPath { file =>
- val path = file.getCanonicalPath
- testData.write.parquet(path)
- val df = spark.read.parquet(path)
- df.createOrReplaceTempView("testPushed")
-
- withTempView("testPushed") {
- val exp = sql("select * from testPushed where key =
15").queryExecution.sparkPlan
- assert(exp.toString.contains("PushedFilters: [IsNotNull(key),
EqualTo(key,15)]"))
+ withSQLConf(SQLConf.USE_V1_SOURCE_READER_LIST.key -> "parquet") {
+ withTempPath { file =>
+ val path = file.getCanonicalPath
+ testData.write.parquet(path)
+ val df = spark.read.parquet(path)
+ df.createOrReplaceTempView("testPushed")
+
+ withTempView("testPushed") {
+ val exp = sql("select * from testPushed where key =
15").queryExecution.sparkPlan
+ assert(exp.toString.contains("PushedFilters: [IsNotNull(key),
EqualTo(key,15)]"))
Review comment:
Why not to `collectFirst` to find the expected `FileSourceScanExec` operator
and request for the `PushedFilters` instead?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]