Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23079#discussion_r234474562
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -767,6 +767,15 @@ object ReplaceNullWithFalse extends Rule[LogicalPlan] {
               replaceNullWithFalse(cond) -> value
             }
             cw.copy(branches = newBranches)
    +      case af @ ArrayFilter(_, lf @ LambdaFunction(func, _, _)) =>
    --- End diff --
    
    shall we add a `withNewFunctions` method in `HigherOrderFunction`? Then we 
can simplify this rule to
    ```
    case f: HigherOrderFunction => 
f.withNewFunctions(f.functions.map(replaceNullWithFalse))
    ```


---

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

Reply via email to