[
https://issues.apache.org/jira/browse/TAJO-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001764#comment-15001764
]
ASF GitHub Bot commented on TAJO-1946:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/839#discussion_r44626017
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
---
@@ -274,10 +274,10 @@ private DistinctGroupbyNode
buildMultiLevelBaseDistinctGroupByNode(GlobalPlanCon
// finally this aggregation output tuple's order is GROUP_BY_COL1,
COL2, .... + AGG_VALUE, SUM_VALUE, ...
GroupbyNode otherGroupbyNode = new
GroupbyNode(context.getPlan().getLogicalPlan().newPID());
- Target[] targets = new
Target[otherAggregationFunctionTargets.size()];
+ List<Target> targets = new ArrayList<>();
int targetIdx = 0;
for (Target eachTarget : otherAggregationFunctionTargets) {
- targets[targetIdx++] = eachTarget;
+ targets.add(eachTarget);
--- End diff --
This loop looks to be able to be removed.
> Change Projectable::setTargets and getTargets to set and get List<Target>
> -------------------------------------------------------------------------
>
> Key: TAJO-1946
> URL: https://issues.apache.org/jira/browse/TAJO-1946
> Project: Tajo
> Issue Type: Sub-task
> Components: Planner/Optimizer
> Reporter: Hyunsik Choi
> Assignee: Dongkyu Hwangbo
> Priority: Minor
> Labels: newbie
>
> See TAJO-1938. It would simplify lots of codes for 'for-loop' on Targets if
> we change {{Projectable::setTargets}} and {{getTargets}} to set and get
> {{List<Target>}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)