gene-bordegaray commented on code in PR #23184:
URL: https://github.com/apache/datafusion/pull/23184#discussion_r3539163088


##########
datafusion/physical-optimizer/src/ensure_requirements/enforce_distribution.rs:
##########
@@ -1041,6 +1045,92 @@ fn get_repartition_requirement_status(
         .collect())
 }
 
+/// Enforce cross-child distribution relationships after each child has already
+/// satisfied its own distribution requirement.
+///
+/// If the candidate children are still not co-partitioned, this adds the
+/// conservative key-based repartitions needed to make partition indexes line 
up.
+#[expect(
+    deprecated,
+    reason = "HashPartitioned is accepted during the KeyPartitioned migration"
+)]
+fn enforce_distribution_relationships(
+    plan_name: &str,
+    input_distributions: &RequiredInputDistributions,
+    children: &mut [(
+        DistributionContext,
+        Option<OrderingRequirements>,
+        bool,
+        Distribution,
+    )],
+    target_partitions: usize,

Review Comment:
   I cleaned this up breaking it into two stages for now
   1. satisfying the individual requiremnts
   2. satisfying the cross requirements
   
   I think the shape I made is better than what we had but this is still in 
need of just a refactor



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