eason-yuchen-liu commented on code in PR #59629:
URL: https://github.com/apache/spark/pull/59629#discussion_r4340488373
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/join/StreamingSymmetricHashJoinHelper.scala:
##########
@@ -243,20 +243,32 @@ object StreamingSymmetricHashJoinHelper extends Logging {
JoinStateKeyWatermarkPredicate(
e,
eventTimeWatermarkForEviction.get,
- eventTimeWatermarkForLateEvents)
+ // V4 can skip keys at or below the previous watermark only if
late-input filtering
+ // rejects new rows in that range on this same key. A watermark on
the other input's
+ // equality key can drive eviction even when this input has no
watermark, or has one
+ // on a different column. New rows can then pass late-input
filtering with keys
+ // already eligible for eviction. V4 must scan from the beginning
to find them;
+ // otherwise, outer joins can fail to emit null rows for these
unmatched inputs.
+ eventTimeWatermarkForLateEvents.filter { _ =>
Review Comment:
nit: `filter { _ => ... }` throws away its argument, and the long comment
inside the arg list is hard to follow. Could this be a `val
prevStateKeyWatermark = if (...) eventTimeWatermarkForLateEvents else None`?
--
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]