alamb commented on code in PR #8127:
URL: https://github.com/apache/arrow-datafusion/pull/8127#discussion_r1390214325


##########
datafusion/core/src/physical_optimizer/enforce_distribution.rs:
##########
@@ -1159,11 +1157,11 @@ fn replace_order_preserving_variants_helper(
     if let Some(repartition) = 
exec_tree.plan.as_any().downcast_ref::<RepartitionExec>() {
         if repartition.preserve_order() {
             return Ok(Arc::new(
+                // new RepartitionExec don't preserve order
                 RepartitionExec::try_new(
                     updated_children.swap_remove(0),
                     repartition.partitioning().clone(),
-                )?
-                .with_preserve_order(false),

Review Comment:
   Per @ozankabak 's suggestion, I removed the `with_preserve_order(false)` as 
well as the boolean argument which was confusing. Now `with_preserve_order()` 
is only called when the code is attempting to maintain the order



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

Reply via email to