Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/555#discussion_r73075658
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/UnionAllPrule.java
 ---
    @@ -61,7 +61,8 @@ public void onMatch(RelOptRuleCall call) {
             convertedInputList.add(convertedInput);
           }
     
    -      traits = 
call.getPlanner().emptyTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON);
    +      // distribution trait is set to ANY to allow Union-All to inherit 
the distribution of its child
    +      traits = 
call.getPlanner().emptyTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.ANY);
    --- End diff --
    
    The union-all's distribution trait will be ANY (I should modify the comment 
since it is not accurate).   If there is another downstream operator after 
union-all, such as Aggregation or Join, that operator will impose its own 
distribution requirement.  Treating the output trait as ANY is at least better 
than the current SINGLETON but we are not propagating either the LHS or RHS 
trait...this could be an enhancement.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to