Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/555#discussion_r73028431
--- 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 --
Will it work by setting "ANY" in case inputs of union-all has different
distribution trait?
Let's say LHS has Hash-distribution(col1), RHS has Hash-distribution(co1,
col2), or Random distribution. What will union-all's distribution trait? Will
it use LHS, or RHS ?
---
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.
---