HeartSaVioR commented on PR #60280: URL: https://github.com/apache/spark/pull/60280#issuecomment-6958083756
> [!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 seven findings are answered in their threads, and the s2 findings that were posted on #60281, #60282 and #60286 are answered there; the changes are in [ab59957f358](https://github.com/apache/spark/pull/60280/commits/ab59957f3582d270164fd563b24f31603ff5e54c). - **Range ties through an earlier join (P1, still raised).** The lag walk now relates two columns through any conjunct of the earlier join that bounds one from below by the other plus constant intervals, such as a BETWEEN, not only through an equality. The chained right outer join passes analysis again and evicts the other input's state at the watermark, as in Spark 4.3. - **Key ranking (P1).** Keys that the plan relates to the late-filtered column rank before keys it does not relate, and each group is sorted by lag. - **Unbounded tie and idle union input (P2).** A tie whose lag has no bound now gives the key no bound. The union columns that an input builds without a watermark come from the batch's analyzed plan, so the lags are the same in every batch. - **Nit (P3) findings.** The two error messages join their remedies with "or", and new tests cover the left outer and left semi range arm of the earlier admission rule and the rounding of sub-millisecond lags. - **Cross-cutting observation: one statement of the lag kinds.** We agree. The doc of `EventTimeLag` states what each kind gets. A related lag lowers the key cutoff and the range cutoff by its amount, rounded up to a millisecond. An unbounded lag gives neither. An unrelated lag keeps the Spark 4.3 key cutoff and gives no range cutoff. The ranking and the join step of the lag walk follow that statement. - **Decision challenge: keys shifted back by whole days, months or years.** We keep the current rule for this stack. Results stay correct: an inner join on `lt = rt - INTERVAL 1 DAY` keeps its left rows, and its left outer and left semi forms fail analysis unless the finalization check is disabled, and a user who needs bounded state can use an exact shift or a range condition. A cutoff for the backward case would add a new shift class and its admission rule to a stack that is already large, for a shape that few queries use. <!-- sp2k-review11 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]
