HeartSaVioR commented on PR #60280:
URL: https://github.com/apache/spark/pull/60280#issuecomment-6775625413

   > [!NOTE]
   > **DISCLAIMER:** This comment was written by an LLM: Claude Opus 5.5 
(`claude-opus-5-5`, 1M context), running as an SP2K agent on behalf of 
@HeartSaVioR.
   
   Thanks for the 
[review](https://github.com/apache/spark/pull/60280#pullrequestreview-5839575368).
 Answers to the items in its summary; the inline comments are answered in their 
threads.
   
   - **Rows admitted between the late-events watermark and the cutoff.** Both 
cases are fixed: the left semi drop in a separate PR against master (#60307), 
and the V4 scan start in 
[c4bdbf09fdb](https://github.com/apache/spark/pull/60280/commits/c4bdbf09fdbea72fee5ab22ad03b839f1d9d7a37).
 See the inline replies.
   - **Preserved rows whose eviction key is NULL.** Fixed with one rule in 
SPARK-61344 (#60279, 
[4fd804c5931](https://github.com/apache/spark/pull/60279/commits/4fd804c59319e26930682a4838f73f995b148c23)):
 such a row is emitted padded with nulls on arrival and never stored. Old V4 
checkpoints that hold such rows now resume 
([c4bdbf09fdb](https://github.com/apache/spark/pull/60280/commits/c4bdbf09fdbea72fee5ab22ad03b839f1d9d7a37)).
 See the inline replies.
   - **Shared repair plan 1.** Done as proposed 
([c4bdbf09fdb](https://github.com/apache/spark/pull/60280/commits/c4bdbf09fdbea72fee5ab22ad03b839f1d9d7a37)):
 for a positive shift the scan starts after the late watermark, for a negative 
shift after the shifted cutoff. The test covers both signs in V2, V3 and V4.
   - **PR description.** Updated: the description and the migration note now 
say that equality joins with a watermark on only one input keep the watermarked 
input's rows for the life of the query and hold back the output watermark.
   - **Decision challenge: no setting restores the old behavior.** Added the 
internal conf `spark.sql.streaming.join.checkFinalization.enabled`, default 
`true` 
([c4bdbf09fdb](https://github.com/apache/spark/pull/60280/commits/c4bdbf09fdbea72fee5ab22ad03b839f1d9d7a37)).
 When it is `false`, an outer or left semi join that fails the new finalization 
requirement logs a warning and runs. The corrected eviction cannot be turned 
off, because the old eviction drops matches and emits null rows too early: a 
query admitted this way keeps that input's state for the life of the query, and 
an outer join never emits those unmatched rows. The admission error and the 
migration guide name the conf, and the guide says why these corrections are 
made only in 4.4.0. The same conf answers the questions on #60283 and #60284.
   - **Decision challenge: one-watermark equality joins stall downstream 
operators.** Holding the watermark back is required here, so we kept the 
behavior and made it visible 
([c4bdbf09fdb](https://github.com/apache/spark/pull/60280/commits/c4bdbf09fdbea72fee5ab22ad03b839f1d9d7a37)).
 The admission error, the join support table and the migration guide now say 
that a stateful operator after the join that uses the other input's event time 
also needs a watermark on this input and a reverse time constraint. Without 
them, the join holds back its output watermark and that operator stops emitting 
results.
   
   <!-- sp2k-review1 toplevel 60280 -->
   


-- 
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]

Reply via email to