gene-bordegaray commented on code in PR #19304:
URL: https://github.com/apache/datafusion/pull/19304#discussion_r2620207199
##########
datafusion/physical-optimizer/src/enforce_distribution.rs:
##########
@@ -1246,12 +1265,19 @@ pub fn ensure_distribution(
hash_necessary,
},
)| {
+ let increases_partition_count =
+ child.plan.output_partitioning().partition_count() <
target_partitions;
+
let add_roundrobin = enable_round_robin
// Operator benefits from partitioning (e.g. filter):
&& roundrobin_beneficial
&& roundrobin_beneficial_stats
// Unless partitioning increases the partition count, it is
not beneficial:
- && child.plan.output_partitioning().partition_count() <
target_partitions;
+ && increases_partition_count;
+
+ let allow_subset_partition = !repartition_subset_satisfactions
+ && !is_partitioned_join
+ && !increases_partition_count;
Review Comment:
we only allow subset partitioning if `repartition_subset_satisfaction` is
false, maybe I will rename this variable. It is supposed to indicate if we are
allowing subsets to satisfy partitioning
--
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]