Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19522#discussion_r145273783
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -176,6 +176,8 @@ object ReorderAssociativeOperator extends 
Rule[LogicalPlan] {
     object OptimizeIn extends Rule[LogicalPlan] {
       def apply(plan: LogicalPlan): LogicalPlan = plan transform {
         case q: LogicalPlan => q transformExpressionsDown {
    +      case expr @ In(v, _) if expr.isListEmpty =>
    +        If(IsNull(v), Literal.create(null, BooleanType), FalseLiteral)
    --- End diff --
    
    But if we don't change the plan here, then maybe it's worth to keep the 
initial change in the `buildFilters` to return false there without actually 
evaluating the filter itself, which is not needed in that case. What do you 
think?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to