vanzin commented on a change in pull request #26108: [SPARK-26154][SS]
Streaming left/right outer join should not return outer nulls for already
matched rows
URL: https://github.com/apache/spark/pull/26108#discussion_r338822846
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingSymmetricHashJoinExec.scala
##########
@@ -294,9 +313,15 @@ case class StreamingSymmetricHashJoinExec(
}
}
val removedRowIter = rightSideJoiner.removeOldState()
- val outerOutputIter = removedRowIter
- .filterNot(pair => matchesWithLeftSideState(pair))
- .map(pair => joinedRow.withLeft(nullLeft).withRight(pair.value))
+ val outerOutputIter = removedRowIter.filterNot { kvAndMatched =>
+ stateFormatVersion match {
+ case 1 => matchesWithLeftSideState(
+ new UnsafeRowPair(kvAndMatched.key, kvAndMatched.value))
+ case 2 => kvAndMatched.matched
+ case _ => throw new IllegalStateException("Incorrect state format
version! " +
Review comment:
Same.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]