leanken commented on a change in pull request #29104:
URL: https://github.com/apache/spark/pull/29104#discussion_r456729008
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
##########
@@ -259,6 +259,31 @@ abstract class SparkStrategies extends
QueryPlanner[SparkPlan] {
if (canBuildLeft(joinType)) BuildLeft else BuildRight
}
+ /**
+ * See. [SPARK-32290]
+ * Not in Subquery will almost certainly be planned as a Broadcast
Nested Loop join,
+ * which is very time consuming because it's an O(M*N) calculation.
+ * But if it's a single column NotInSubquery, and buildSide data is
small enough,
+ * O(M*N) calculation could be optimized into O(M) using hash lookup
instead of loop lookup.
+ */
+ def createBroadcastNullAwareHashJoin() = {
+ if (conf.notInSubqueryHashJoinEnabled &&
+ joinType == LeftAnti &&
+ canBroadcastBySize(right, conf) &&
+ right.output.length == 1) {
+ val (matched, _, _) =
+
joins.NotInSubqueryConditionPattern.singleColumnPatternMatch(condition)
Review comment:
agree with you that ExecNode should unconditionally do execution jobs. I
will update in next patch.
----------------------------------------------------------------
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]