anishshri-db commented on a change in pull request #36002:
URL: https://github.com/apache/spark/pull/36002#discussion_r840144732
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingSymmetricHashJoinExec.scala
##########
@@ -324,17 +324,21 @@ case class StreamingSymmetricHashJoinExec(
}
}
+ val initIterFn = { () =>
+ val removedRowIter = leftSideJoiner.removeOldState()
+ removedRowIter.filterNot { kv =>
+ stateFormatVersion match {
+ case 1 => matchesWithRightSideState(new UnsafeRowPair(kv.key,
kv.value))
+ case 2 => kv.matched
+ case _ => throwBadStateFormatVersionException()
+ }
+ }.map(pair => joinedRow.withLeft(pair.value).withRight(nullRight))
+ }
+
// NOTE: we need to make sure `outerOutputIter` is evaluated "after"
exhausting all of
- // elements in `innerOutputIter`, because evaluation of
`innerOutputIter` may update
+ // elements in `hashJoinOutputIter`, because evaluation of
`hashJoinOutputIter` may update
Review comment:
> We probably could mention simply as ", otherwise it may lead to
correctness issues. Please refer
[SPARK-38684](https://issues.apache.org/jira/browse/SPARK-38684) for more
details."
Yes, sounds good 👍
--
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]