Dandandan commented on a change in pull request #55:
URL: https://github.com/apache/arrow-datafusion/pull/55#discussion_r619791415



##########
File path: datafusion/src/physical_optimizer/coalesce_batches.rs
##########
@@ -58,7 +59,17 @@ impl PhysicalOptimizerRule for CoalesceBatches {
         // See https://issues.apache.org/jira/browse/ARROW-11068
         let wrap_in_coalesce = plan_any.downcast_ref::<FilterExec>().is_some()
             || plan_any.downcast_ref::<HashJoinExec>().is_some()
-            || plan_any.downcast_ref::<RepartitionExec>().is_some();
+            || {
+                match plan_any.downcast_ref::<RepartitionExec>() {
+                    Some(p) => match p.partitioning() {
+                        // do not coalesce hash partitions since other plans 
like partitioned hash
+                        // join depends on it empty batches for outter joins

Review comment:
       ```suggestion
                           // join depends on it empty batches for outer joins
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to