Github user blrunner commented on a diff in the pull request:
https://github.com/apache/tajo/pull/136#discussion_r18262290
--- Diff:
tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java ---
@@ -816,9 +820,30 @@ public static int calculateShuffleOutputNum(SubQuery
subQuery, DataChannel chann
if (grpNode.getType() == NodeType.GROUP_BY) {
hasGroupColumns =
((GroupbyNode)grpNode).getGroupingColumns().length > 0;
} else if (grpNode.getType() == NodeType.DISTINCT_GROUP_BY) {
- hasGroupColumns =
((DistinctGroupbyNode)grpNode).getGroupingColumns().length > 0;
+ // Find current distinct stage node.
+ DistinctGroupbyNode distinctNode =
PlannerUtil.findMostBottomNode(subQuery.getBlock().getPlan(),
NodeType.DISTINCT_GROUP_BY);
+ if (distinctNode == null) {
+ LOG.warn(subQuery.getId() + ", Can't find current
DistinctGroupbyNode");
+ distinctNode = (DistinctGroupbyNode)grpNode;
--- End diff --
I found a bug on production cluster. So, I had to add above codes.
---
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.
---