ulysses-you commented on PR #60553: URL: https://github.com/apache/spark/pull/60553#issuecomment-6998975809
Thanks for the review, @peter-toth. `d66c1e1b6fc` addresses the three points. - **Nested cost (finding 1).** We are not changing the mechanism, and `spark.sql.adaptive.pushDownShuffleThroughUnion.allowV2Bucketing.enabled` now defaults to false, so keyed targets and this cost are opt-in. Choosing between an inner keyed target and the enclosing site's push-down needs a planning-time cost estimate; `sizeInBytes` is unreliable for aggregate outputs and often missing, so a byte or pushed-set comparison can invert the choice for a high-compression aggregate over a large scan. The `allowV2Bucketing` doc keeps the disclosure. - **Recorded origin (finding 2).** Taken as suggested: `rebuildChild` declines a target that loses a recorded origin before the whole-plan check, so the site falls back to its next target and the other sites keep their keyed targets. `a recorded origin declines only the site that breaks it` pins it. - **Replay (alternative 3).** Kept, with the ineffective part removed. Dropping the replay changes plans in reachable shapes: with the replay code removed, four end-to-end tests and two plan-level tests fail, including `the replay keeps a keyed site beside a hash site` and `the replay keeps the keyed domain the planner pairs the union on`, and `the replay takes a removed layout when no keyed layout exists` pins the input-plan replay's second attempt. `partialReplayKeyed` no longer tries the removed exchange's layout for a site the hash-only pass left alone: a hash layout a child offers is already taken by that pass, and a keyed one is recorded with `HASH_ROUTING`, which a scan never matches. The nested cost of the input-plan replay is stated in the `partialReplay` doc. Suites at this head: `ShuffleSpecSuite` 47, `PushDownShuffleExchangeThroughUnionSuite` 142, `KeyGroupedPartitioningSuite` 272, scalastyle clean. -- 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]
