c21 commented on a change in pull request #29216:
URL: https://github.com/apache/spark/pull/29216#discussion_r460334659
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashJoin.scala
##########
@@ -172,14 +208,26 @@ trait HashJoin extends BaseJoinExec {
val joinKeys = streamSideKeyGenerator()
val result = new GenericInternalRow(Array[Any](null))
val joinedRow = new JoinedRow
- streamIter.map { current =>
- val key = joinKeys(current)
- lazy val buildIter = hashedRelation.get(key)
- val exists = !key.anyNull && buildIter != null && (condition.isEmpty ||
buildIter.exists {
- (row: InternalRow) => boundCondition(joinedRow(current, row))
- })
- result.setBoolean(0, exists)
- joinedRow(current, result)
+
Review comment:
@viirya - I just found [`test single unique condition (equal) for left
Anti
join`](https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/joins/ExistenceJoinSuite.scala#L228)
in `ExistenceJoinSuite` already covered [existence
join](https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/joins/ExistenceJoinSuite.scala#L95-L104).
So we should be good with existence join. More historical context for
existence join is [this PR](https://github.com/apache/spark/pull/12820) just
FYI.
----------------------------------------------------------------
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]