HeartSaVioR 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_r334353928
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManager.scala
##########
@@ -380,18 +412,85 @@ class SymmetricHashJoinStateManager(
* Helper class for representing data returned by
[[KeyWithIndexToValueStore]].
* Designed for object reuse.
*/
- private case class KeyWithIndexAndValue(
- var key: UnsafeRow = null, var valueIndex: Long = -1, var value: UnsafeRow
= null) {
- def withNew(newKey: UnsafeRow, newIndex: Long, newValue: UnsafeRow):
this.type = {
+ private class KeyWithIndexAndValueWithMatched(
+ var key: UnsafeRow = null,
+ var valueIndex: Long = -1,
+ var value: UnsafeRow = null,
+ var matched: Boolean = false) {
Review comment:
Here `matched` also has a default value for state format version 1 - the
main version of state format version is 2, so focused to optimize for state
format version 2. (`Option[Boolean] vs Boolean`) The value is not used in
caller if the state format version is 1, so I think this is OK.
----------------------------------------------------------------
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]