Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/16044
  
    You can just write an optimizer test case. You can for example add this to 
the `FilterPushdownSuite`:
    ```scala
      test("joins: only push down join conditions to the right of an existence 
join") {
        val x = testRelation.subquery('x)
        val y = testRelation.subquery('y)
        val filerVal = 'val.boolean
        val originalQuery =
          x.join(y,
            ExistenceJoin(filerVal),
            Some("x.b".attr === "y.b".attr && "y.a".attr > 10 && "x.a".attr > 
10)).analyze
        val optimized = Optimize.execute(originalQuery)
        val correctAnswer =
          x.join(
            y.where("y.a".attr > 10),
            ExistenceJoin(filerVal),
            Some("x.b".attr === "y.b".attr && "x.a".attr > 10))
            .analyze
        comparePlans(optimized, 
analysis.EliminateSubqueryAliases(correctAnswer))
      }
    ```
    This probably passes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to