mustafasrepo commented on code in PR #8757:
URL: https://github.com/apache/arrow-datafusion/pull/8757#discussion_r1442568002
##########
datafusion/core/src/physical_optimizer/enforce_distribution.rs:
##########
@@ -927,9 +927,8 @@ fn add_hash_on_top(
n_target: usize,
repartition_beneficial_stats: bool,
) -> Result<DistributionContext> {
- let partition_count = input.plan.output_partitioning().partition_count();
// Early return if hash repartition is unnecessary
- if n_target == partition_count && n_target == 1 {
Review Comment:
I think previous check was wrong, partition count equality doesn't mean
their hash requirement is satisfied. However, when target is 1 hash requirement
is trivially satisfied
--
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]