goutamadwant commented on code in PR #24766:
URL: https://github.com/apache/datafusion/pull/24766#discussion_r4079726001
##########
datafusion/physical-optimizer/src/ensure_requirements/enforce_distribution.rs:
##########
@@ -1194,11 +1198,9 @@ fn enforce_distribution_relationships(
})
.collect();
- // Only select a reference candidate if there is a unique,
strictly
- // larger winner (`size_a > size_b`). If candidates have
equal or
- // incomparable sizes (e.g. non-overlapping metrics),
return None
- // so the optimizer avoids arbitrary tie-breaking and
falls back to
- // standard distribution.
+ // Prefer a unique, strictly larger winner (`size_a >
size_b`).
+ // Otherwise avoid arbitrary tie-breaking, except for the
new
+ // preserved-range case below.
Review Comment:
right @stuhood.i removed the stale preserved-range exception from that
comment. It now describes the actual choice: use a uniquely larger reference
when one exists; otherwise use standard distribution.
--
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]