sunchao commented on code in PR #55927:
URL: https://github.com/apache/spark/pull/55927#discussion_r3263012257


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/ShuffledJoin.scala:
##########
@@ -28,6 +28,21 @@ import 
org.apache.spark.sql.catalyst.plans.physical.{ClusteredDistribution, Dist
 trait ShuffledJoin extends JoinCodegenSupport {
   def isSkewJoin: Boolean
 
+  private def containsNullSafeJoinMarker(keys: Seq[Expression]): Boolean = {
+    keys.exists(_.exists(_.isInstanceOf[IsNull]))
+  }
+
+  private lazy val canSpreadNullJoinKeys: Boolean = {

Review Comment:
   Updated the PR description.
   
   As for left anti join, yes, ordinary shuffled left anti equi-joins with = 
could likely benefit for the same reason as outer joins: preserved left-side 
rows with NULL join keys are guaranteed not to match, so concentrating them on 
one reducer is unnecessary. I kept this PR scoped to outer joins for now to 
avoid broadening the change.
   
   



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/ShuffledJoin.scala:
##########
@@ -28,6 +28,21 @@ import 
org.apache.spark.sql.catalyst.plans.physical.{ClusteredDistribution, Dist
 trait ShuffledJoin extends JoinCodegenSupport {
   def isSkewJoin: Boolean
 
+  private def containsNullSafeJoinMarker(keys: Seq[Expression]): Boolean = {
+    keys.exists(_.exists(_.isInstanceOf[IsNull]))
+  }
+
+  private lazy val canSpreadNullJoinKeys: Boolean = {

Review Comment:
   Updated the PR description.
   
   As for left anti join, yes, ordinary shuffled left anti equi-joins with `=` 
could likely benefit for the same reason as outer joins: preserved left-side 
rows with NULL join keys are guaranteed not to match, so concentrating them on 
one reducer is unnecessary. I kept this PR scoped to outer joins for now to 
avoid broadening the change.
   
   



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