wangyum opened a new pull request #31901: URL: https://github.com/apache/spark/pull/31901
### What changes were proposed in this pull request? Move `// Operator push down` to the back of `// Constant folding and strength reduction`. ### Why are the changes needed? Current order will push down useless condition from join condition. For example: ``` spark.sql("SELECT * FROM t1 INNER JOIN t2 ON (a = b AND true)").explain ``` ``` === Applying Rule org.apache.spark.sql.catalyst.optimizer.PushDownPredicates === !Join Inner, ((a#4L = b#5L) AND true) Join Inner, (a#4L = b#5L) !:- Relation default.t1[a#4L] parquet :- Filter true !+- Relation default.t2[b#5L] parquet : +- Relation default.t1[a#4L] parquet ! +- Relation default.t2[b#5L] parquet ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? TODO -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org