mustafasrepo commented on issue #9928:
URL: 
https://github.com/apache/arrow-datafusion/issues/9928#issuecomment-2058366415

   I could generate a datafusion only reproducer. The following query triggers 
same error when target partition is 1.
   ```
   SELECT * FROM (
       SELECT 1 as c, 2 as d
       UNION ALL
       SELECT 1 as c, 3 AS d
   ) as a FULL JOIN (SELECT 1 as e, 3 AS f) AS rhs ON a.c=rhs.e;
   ```
   To set target partition to 1, following command can be used:
   ```
   statement ok
   set datafusion.execution.target_partitions = 1;
   ```
   I understood the problem. It seems that while satisfying hash requirement we 
do not add hash repartition when target partition is 1 (assuming source has 
single partition, hence `Repartatition(n_inout=1, n_output=1)` is unnecessary). 
However, source may not have always single partition, as in the example. Will 
file a fix shortly for this bug.


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