rekbun commented on PR #59522: URL: https://github.com/apache/spark/pull/59522#issuecomment-6838040457
Thanks, @peter-toth and @ulysses-you. I'll rework it as a separate operator, as Peter described: - `BatchScanExec`, `CacheManager` and `ReplaceHashWithSortAgg` go back to master. - A rule wraps a `ShuffleExchangeExec`'s child when it reads one non-file DSv2 scan through Project, Filter, Sort, a partial aggregate or a broadcast hash join's streamed side. The first four are the operator `DisableUnnecessaryBucketedScan` allows, and a broadcast hash join maps each streamed partition to one output partition. The rule runs after `RemoveRedundantSorts` rather than right after `EnsureRequirements`, so it doesn't hide the local sort that rule removes under a shuffle, and with AQE it also sees the shuffle that skew join optimization can add. - At execution, the node packs the scan's inputs left after runtime filtering with the same packer, and runs them through `GroupedPartitionCoalescer`. It reports `UnknownPartitioning(0)`. Inputs that runtime filtering emptied stay in the groups, since a global aggregate still emits a row for an empty partition. - Plan roots, broadcast build sides and unions stay out of this PR. - For locations, I'll take finding 1 in #60256, so the groups vote through the scan's lineage. @ulysses-you, agreed on the analogy with AQE's shuffle read: the node only regroups the partitions it reads. The distribution-preserving version would then be a grouping over GPE that reports a coalesced keyed partitioning, modeled on `CoalescedHashPartitioning`: whole keys per group, boundaries decided at planning from the keyed splits' sizes, and the same boundaries on both sides of a join. -- 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]
