LuciferYang commented on a change in pull request #35694:
URL: https://github.com/apache/spark/pull/35694#discussion_r823454421



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -1690,11 +1690,10 @@ object PushPredicateThroughNonJoin extends 
Rule[LogicalPlan] with PredicateHelpe
    */
   private def canPushThroughCondition(plan: LogicalPlan, condition: 
Expression): Boolean = {
     val attributes = plan.outputSet
-    val matched = condition.find {
-      case s: SubqueryExpression => 
s.plan.outputSet.intersect(attributes).nonEmpty
-      case _ => false
+    condition.exists {

Review comment:
       I revert this to:
   
   ```scala
   !condition.exists {
         case s: SubqueryExpression => 
s.plan.outputSet.intersect(attributes).nonEmpty
         case _ => false
       }
   ```
   @cloud-fan 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to