Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/839#discussion_r44932832
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
---
@@ -1322,14 +1317,16 @@ public LogicalNode
visitTableSubQuery(GlobalPlanContext context, LogicalPlan pla
if (eachNode.getPID() == leftMostSubQueryNode.getPID()) {
continue;
}
- Target[] eachNodeTargets = eachNode.getTargets();
- if (eachNodeTargets.length != targetMappings.length) {
+ List<Target> eachNodeTargets = eachNode.getTargets();
+ if (eachNodeTargets.size() != targetMappings.length) {
throw new TajoInternalError("Union query can't have
different number of target columns.");
}
- for (int i = 0; i < eachNodeTargets.length; i++) {
+ for (int i = 0; i < eachNodeTargets.size(); i++) {
Column inColumn =
eachNode.getInSchema().getColumn(targetMappings[i]);
-
eachNodeTargets[i].setAlias(eachNodeTargets[i].getNamedColumn().getQualifiedName());
- EvalNode evalNode = eachNodeTargets[i].getEvalTree();
+ Target t = eachNodeTargets.get(i);
+ t.setAlias(t.getNamedColumn().getQualifiedName());
+ eachNodeTargets.set(i, t);
--- End diff --
This line seems to be unnecessary.
---
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.
---