HeartSaVioR commented on PR #60283: URL: https://github.com/apache/spark/pull/60283#issuecomment-6961423695
> [!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 re-review. All five findings are answered in their threads, with the changes in [1ee972a3d0a](https://github.com/apache/spark/pull/60283/commits/1ee972a3d0a69925484a5ab4ae268c0bb129561a). - **Unions of window columns (P1).** A window column now records its shortest and longest window length. A whole-window comparison gives a cutoff when the stored column's shortest window lasts at least as long as the other column's longest, so a union whose children all pass the length rule takes a cutoff again, and a union with a child that records none gets none. - **Window length read from a stored or supplied schema (P1).** Recorded lengths stay with the query whose `window()` builds the column. Columns read from tables, files, `readStream.schema` or `createDataFrame`, and nested fields of such schemas, record no length, so a join over them gets no cutoff from a whole-window comparison. - **Nit (P3) findings.** The `baseAdmissionRules` doc names both callers, `TODO(SPARK-61510)` marks the cutoff for shorter stored windows, and the restart check's comments describe the window rule that this PR applies. - **Review-level concerns.** The two P1 findings share one representation, as the review says. `TimeWindow` documents next to the metadata keys what a recorded length guarantees: it holds for every row of the column, and only `window()` in the running query and unions of its columns record it. The restart-check comments now explain the rule that the decision below keeps. - **PR description suggestion.** The description is being rewritten shortly and will cover the runtime eviction of window columns after the event time. - **Decision challenge: left semi joins without a left watermark and a numeric, DATE or TIMESTAMP_NTZ range.** We keep the rejection. With a left watermark, the base branch evicted such a state at a cutoff that could drop matches, so the rejection is a correction there, and for the case without one, consistency with the analysis check's rejection of left semi joins whose bound never finalizes the left state decides it. Setting `spark.sql.streaming.join.checkFinalization.enabled` to `false`, or moving the bound onto a TIMESTAMP column computed before the join, keeps such a query running. - **Decision challenge: older checkpoints of whole-window joins.** We keep rejecting every older checkpoint of a whole-window ordering. The check fails at restart with the explicit error, before any state is opened, so no saved row is misread. Accepting the orderings that keep the older bound needs the check to apply the window-length rule with two solves of its own, and we do not want that logic in the restart check of this stack. <!-- sp2k-review11 toplevel 60283 --> -- 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]
