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

   > [!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 re-review. This round fixes the restart of chained V4 joins 
after a plan change, accepts restarts with a comparison that no version reads 
and joins followed only by operators that ignore the watermark, and evicts 
restored rows with a NULL eviction column in V1 to V3. It also documents why 
older checkpoints scan V4 from the start on every run. For outer joins bounded 
only through a cast, this PR now has a TODO that names SPARK-61348; #60283 
rejects that shape, so we treat it as an in-between state of the stack. The 
inline replies and the decision-challenge replies have the details.
   
   - **Decision challenge: inner and left semi joins keep a side bounded only 
through a cast for the life of the query.** Thanks. We agree that keeping these 
rows is more state than correct results need. Evicting by `CAST(column AS 
TIMESTAMP) <= cutoff` is the right end state. It needs an expression-valued 
eviction predicate in V1 to V3 and a V4 index timestamp computed from the cast. 
The second changes the V4 state layout, so the restart check needs new rules 
too. We prefer to do that in a follow-up, SPARK-61508, and keep this stack 
about correct results. Until then, users can project the column to TIMESTAMP 
before the join. The column then bounds the side's state, and for outer joins 
#60283 gives that hint in its error.
   - **Decision challenge: operators reading an unbounded join input's event 
time stall silently.** Thanks. We adopted failing at query start, in #60280 
(step 2) of this stack. There, an append-mode aggregation over the event time 
of a join input without a bound fails with 
`STREAMING_JOIN_UNBOUNDED_DOWNSTREAM_EVENT_TIME`, which names the input and 
what is missing. Setting `spark.sql.streaming.join.checkFinalization.enabled` 
to false turns the error into a warning; we use that conf because it already 
controls the related join admission check. Step 1 alone does not have the 
check, so this is an in-between state of the stack. Update-mode operators keep 
running. We answer the scope question for event-time timeouts and later joins 
on #60280.
   - **PR description.** Updated. It now says that the first batch of every run 
of a checkpoint pinned to an older version scans the V4 eviction indexes from 
the start, and that, until SPARK-61348 (#60283) merges, an outer join bounded 
only through a column cast to TIMESTAMP keeps its unmatched rows in state.
   
   <!-- sp2k-review3 toplevel 60279 -->
   


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