alamb commented on code in PR #18521:
URL: https://github.com/apache/datafusion/pull/18521#discussion_r2510867437


##########
datafusion/physical-optimizer/src/enforce_distribution.rs:
##########
@@ -1273,7 +1273,7 @@ pub fn ensure_distribution(
                     child = add_merge_on_top(child);
                 }
                 Distribution::HashPartitioned(exprs) => {
-                    if add_roundrobin {
+                    if add_roundrobin && !hash_necessary {

Review Comment:
   Perhaps we can link to the comment: 
https://github.com/apache/datafusion/issues/18341#issuecomment-3503238325
   
   That way you can edit / update the comment as needed
   
   Something like this perhaps
   
   ```suggestion
                       // See 
https://github.com/apache/datafusion/issues/18341#issuecomment-3503238325 for 
background
                       if add_roundrobin && !hash_necessary {
   ```
   



-- 
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]

Reply via email to