stuhood commented on PR #26593: URL: https://github.com/apache/datafusion/pull/26593#issuecomment-7323780154
> The performance of the former and latter **are close but nonzero** with the implementation of empty partition skipping (I benchmarked that [here](https://github.com/jayshrivastava/datafusion/commit/6e7978bc514df547e21b27b6f95278057a49a6a2#diff-caf0983cbac0190a5340566847d57f01719f2847a43ca0f6b9fc1a7975b3219f) building on Stu's bench: https://github.com/paradedb/datafusion/blob/732c2171387105f567d66a27ccc573ddc2cbe2c8) To be clear: that demo was just vibed up to show that it was possible to reduce the overhead of having many partitions: in general, all work done to reduce per-partition overhead is beneficial with/without distribution, because it benefits a 128 core machine as well as a 1600 task distributed query. So yes, but I expect that the overhead could be reduced further with more attention. > Imo the simpler approach is to skip the projection/transform entirely by storing split partitions only. Does this account for the fact that `Partitioning` would no longer be a total function (rather, a partial function which needs error handling), which leads to a lot of the complexity in this PR? > Lastly, `Hash` partitions are distributed via a splitting approach rather than duplicating + inserting empty partitions. Ideally, we don't have one approach for `Hash` and a different one for `Range`. It's not clear why they need separate handling: the empty partition handling would work the same for both of them, afaict? > For example, we would need determine which workers a shuffle client should request to get their desired ranges. That requires reconstructing the non-duplicated partitioning across workers to know the minimal number of connections to make. This feels very related to https://github.com/apache/datafusion/issues/25483, which is also relevant to making non-distributed shuffles/re-partitions cheaper in DF. > I would be interested in [@avantgardnerio](https://github.com/avantgardnerio)'s input as well, both from ballista's perspective and from [#23089](https://github.com/apache/datafusion/issues/23089). The latter discusses how partition bounds can be useful for partition pruning and optimizing window functions. It also importantly notes how partition bounds != runtime stats because Yes, me too. But my impression of #23089 after further consideration is that it would amount to beginning to implement AQE in DF... I think that if we want to implement AQE directly in the DF core (maybe we do!) then we should consider it more holistically, rather than introducing mutability into datastructures piecemeal. -- 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]
