xiliang678 commented on PR #60690: URL: https://github.com/apache/spark/pull/60690#issuecomment-7017384803
On the two decision challenges in the review: - The plan that carries only the field that the access reads: I agree with deferring it. 93b35e25580 adds a TODO at the collector's fall-through that describes it (alias `s.arr.x` below the operator and index it above); the plans do not change. - Stream-stream join checkpoints: reproduced. A query wrote a checkpoint without this PR, when its left side output `id: int, _extract_x: int`; with this PR, the left side outputs `id: int, _extract_arr: array<struct<x:int,y:int>>`, and the first micro-batch after restarting from that checkpoint fails with `STATE_STORE_VALUE_SCHEMA_NOT_COMPATIBLE`. Without this PR, a stream-stream join has the same bug, and its state keeps the shared value: on master, a query that joins one left row to 500 right rows in each of two micro-batches returned the same `s.arr[CAST(rand(0) * 1000 AS INT)].x` in all 1000 joined rows, and with this PR it returned 625 distinct values. The old state holds the value computed below the join for each stored row, not `s.arr`, so a restart from it must either keep the old plan, and with it the bug, or fail. This PR fails, as Spark did for the stream-stream outer join fix in 3.0 (SPARK-26154) and for the nullability of typed Scala UDF columns in 4.4 (SPARK-61935). 93b35e25580 adds an entry to `docs/streaming/ss-migration-guide.md`, in a new section for upgrading from 4.4 to 4.5 (the version of branch-4.x); 194089712e1 limits it to queries in which the columns of a join side change, and 6379eabc612 says why such a query cannot continue from the old checkpoint. If the fix also goes to an earlier release line, the entry should move to that release's section. The PR description now covers streaming too; the distinct-values run and the restart run were temporary tests, because the restart needs a checkpoint written without this PR. -- 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]
