Skip to content

Commit 7a7b9fa

Browse files
committed
Fix tests according to WholeStageCodegen implemented
1 parent 4250602 commit 7a7b9fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ class JDBCSuite extends SparkFunSuite
223223
val parentPlan = df.queryExecution.executedPlan
224224
// Check if SparkPlan Filter is not removed in a physical plan because JDBCRDD
225225
// cannot compile given predicates.
226-
assert(parentPlan.isInstanceOf[org.apache.spark.sql.execution.Filter])
226+
assert(parentPlan.isInstanceOf[org.apache.spark.sql.execution.WholeStageCodegen])
227+
val node = parentPlan.asInstanceOf[org.apache.spark.sql.execution.WholeStageCodegen]
228+
assert(node.plan.isInstanceOf[org.apache.spark.sql.execution.Filter])
227229
df
228230
}
229231
assert(checkNotPushdown(sql("SELECT * FROM foobar WHERE (THEID + 1) < 2")).collect().size == 0)

0 commit comments

Comments
 (0)