tanelk commented on a change in pull request #29650:
URL: https://github.com/apache/spark/pull/29650#discussion_r483877757



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -882,7 +882,7 @@ object InferFiltersFromConstraints extends Rule[LogicalPlan]
     }
   }
 
-  private def inferFilters(plan: LogicalPlan): LogicalPlan = plan transform {
+  private def inferFilters(plan: LogicalPlan): LogicalPlan = plan transformUp {

Review comment:
       This might have been a wrong fix.
   
   I now tried adding `right.constraints` to `LeftSemi` joins 
`validConstraints`. This also fixes that SQLQueryTestSuite failure. `LeftSemi` 
join is quite like `Inner` join, so it makes sense to have the same 
constraints, but I'm not 100% sure how having constraints referencing missing 
columns affects everything. The `InferFiltersFromConstraints.inferNewFilter` 
will remove those in the end.




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

Reply via email to