Skip to content

Commit 708716c

Browse files
committed
Update test.
1 parent 54d7b6c commit 708716c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ class JDBCSuite extends SparkFunSuite
187187
val parentPlan = df.queryExecution.executedPlan
188188
// Check if SparkPlan Filter is removed in a physical plan and
189189
// the plan only has PhysicalRDD to scan JDBCRelation.
190-
assert(parentPlan.isInstanceOf[PhysicalRDD])
191-
assert(parentPlan.asInstanceOf[PhysicalRDD].nodeName.contains("JDBCRelation"))
190+
assert(parentPlan.isInstanceOf[org.apache.spark.sql.execution.WholeStageCodegen])
191+
val node = parentPlan.asInstanceOf[org.apache.spark.sql.execution.WholeStageCodegen]
192+
assert(node.plan.isInstanceOf[org.apache.spark.sql.execution.PhysicalRDD])
193+
assert(node.plan.asInstanceOf[PhysicalRDD].nodeName.contains("JDBCRelation"))
192194
df
193195
}
194196
assert(checkPushdown(sql("SELECT * FROM foobar WHERE THEID < 1")).collect().size == 0)

0 commit comments

Comments
 (0)