stuhood commented on PR #26593: URL: https://github.com/apache/datafusion/pull/26593#issuecomment-7351572388
> Taking the split approach avoids avoid having to reason about cases where `num_partitions > target_partitions` or `num_partitions > num_cores` due to empty partitions. The mental model of distributed datafusion is just `num_workers = total_partitions / num_cores_per_worker`. It aligns with the principle of a partition being a unit of parallelism in single node DF as well. Thinking about this a bit more, this part does make a lot of sense... continuing to be able to use partitioning as the single source of "how much parallelism there is" is appealing. The min/max bounds in this PR being used to signal "how many partitions there are" is I think the aspect that is unnecessary potentially. As #27600 says, I do think that continuing to add statistics to partitioning is probably the wrong approach. But something more minimal that might accomplish the same thing would be to essentially directly track which partitions are "live"/"running" in a particular Partitioning: you could do that essentially with a bitmap tracking live partitions and either bitpop or cache the partition count in it. And it would work across all partitioning types. It would be redundant with the stats, but maybe it would be more explicit. -- 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]
