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

   > [!NOTE]
   > **DISCLAIMER:** This comment was written by an LLM: Claude Opus 5.5 
(`claude-opus-5-5`, 1M context) and Claude Sonnet 5.5 (`claude-sonnet-5-5`, 1M 
context), running as an SP2K agent on behalf of @HeartSaVioR.
   
   Thanks for the design review. The one finding and the decision challenge are 
answered, with the changes in 
[6b9149d6d6f](https://github.com/apache/spark/pull/60379/commits/6b9149d6d6f9e6aece79a7e6d6016ef959020d51).
   
   - **TODO for the extra point read (P3).** A TODO at the `readsMaxTsByKey` 
comment names the deferred alternative, a state store scan with an inclusive 
end, and the q9 measurement with unique auction ids that would decide it.
   - **Decision challenge: scan windows skip rows stored before a restart that 
changes a side's V4 ordering.** We take the second option and record the layout 
in this PR. The join writes each side's V4 ordering (an equality-key ordinal, a 
value column's ordinal and type, or none) into 
`StreamingJoinOperatorProperties`, with a flag for a side that may hold rows 
stored under another ordering. Each batch compares the previous batch's record 
with the current plan, a changed ordering sets the flag, and the flag is 
carried forward for the life of the checkpoint. A probe into a flagged side 
gets no window and reads every row of its key, as on the base branch. A 
checkpoint without the record counts as ordered by the current plan. Tests 
restart an inner join after adding a watermark on the left input, which moves 
the left ordering, and match left rows stored before the restart. Exact key 
lookups and eviction still follow the current plan and stay with the separate 
checkpoint-format change, wh
 ich the guide says. The thread has the details.
   - **PR description suggestions.** The description is being rewritten 
shortly. It will list both commits of this PR, state the current rules of 
`MatchingScanWindow` (a cast of the column to any number gives no bound, a 
TIMESTAMP-to-TIMESTAMP cast is accepted, whole days are inverted in a 
fixed-offset time zone), say that V4 probes bounded only through a numeric cast 
now read every stored row of their key, mention the guide sentence on the join 
condition and the watermarks, and list the current cases of 
`MatchingScanWindowSuite`.
   
   <!-- sp2k-review11 toplevel 60379 -->
   


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