kazuyukitanimura commented on a change in pull request #33930:
URL: https://github.com/apache/spark/pull/33930#discussion_r705902435



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala
##########
@@ -404,20 +404,25 @@ object ExtractSingleColumnNullAwareAntiJoin extends 
JoinSelectionHelper with Pre
    * which is very time consuming because it's an O(M*N) calculation.
    * But if it's a single column case O(M*N) calculation could be optimized 
into O(M)
    * using hash lookup instead of loop lookup.
+   *
+   * [SPARK-36665] IsNull(EqualTo(a=b)) gets optimized to Or(IsNull(a), 
IsNull(b))

Review comment:
       The optimization over binary expressions are powerful enough to keep it.
   For example, `Or(IsNull(a), IsNull(b))` is always a better than 
`IsNull(EqualTo(a=b))` because `Or(IsNull(a), IsNull(b))` can go into the push 
down filter. In contrast, `IsNull(EqualTo(a=b))` cannot be pushed down.
   It is just this specific hand-optimization pattern is outlier.
   Given the benefit of optimization, small tweak like this is okay.




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