Skip to content

Commit 45ff68b

Browse files
author
rmishra
committed
Reverting hashjoin optimzation.
1 parent ad8ff3a commit 45ff68b

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

core/src/main/scala/org/apache/spark/sql/execution/joins/HashJoinExec.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,6 @@ case class HashJoinExec(leftKeys: Seq[Expression],
476476
val produced = streamedPlan.asInstanceOf[CodegenSupport].produce(ctx, this)
477477

478478
val beforeMap = ctx.freshName("beforeMap")
479-
val skipScan = skipProcessForEmptyMap()
480-
val skipCondition = if (skipScan) {
481-
s"if($hashMapTerm.size() == 0) return;"
482-
} else ""
483479

484480
s"""
485481
boolean $keyIsUniqueTerm = true;
@@ -495,21 +491,13 @@ case class HashJoinExec(leftKeys: Seq[Expression],
495491
final $entryClass[] $mapDataTerm = ($entryClass[])$hashMapTerm.data();
496492
long $numRowsTerm = 0L;
497493
try {
498-
$skipCondition
499494
${session.evaluateFinallyCode(ctx, produced)}
500495
} finally {
501496
$numOutputRows.${metricAdd(numRowsTerm)};
502497
}
503498
"""
504499
}
505500

506-
private def skipProcessForEmptyMap() : Boolean = {
507-
joinType match {
508-
case Inner | LeftSemi => true
509-
case _ => false
510-
}
511-
}
512-
513501
override def doConsume(ctx: CodegenContext, input: Seq[ExprCode],
514502
row: ExprCode): String = {
515503
// variable that holds if relation is unique to optimize iteration

0 commit comments

Comments
 (0)