cloud-fan commented on a change in pull request #31857:
URL: https://github.com/apache/spark/pull/31857#discussion_r595770741
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala
##########
@@ -1384,4 +1384,14 @@ class FilterPushdownSuite extends PlanTest {
condition = Some("x.a".attr === "z.a".attr)).analyze
comparePlans(optimized, correctAnswer)
}
+
+ test("SPARK-28220: Push down the foldable predicate to both sides of Join") {
+ val x = testRelation.subquery('x)
+ val y = testRelation.subquery('y)
+ val originalQuery = x.join(y, condition = Some(false))
Review comment:
How about we make sure the join condition contains no constant? If it's
true, we can remove it. If it's false, we can remove the join and return an
empty relation.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]