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

    https://github.com/apache/tajo/pull/839#discussion_r44626040
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
 ---
    @@ -437,14 +436,12 @@ private DistinctGroupbyNode 
buildBaseDistinctGroupByNode(GlobalPlanContext conte
           // 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[originalGroupingColumns.size() + 
otherAggregationFunctionTargets.size()];
    -      int targetIdx = 0;
    +      List<Target> targets = new ArrayList<>();
           for (Column column : originalGroupingColumns) {
    -        Target target = new Target(new FieldEval(column));
    -        targets[targetIdx++] = target;
    +        targets.add(new Target(new FieldEval(column)));
           }
           for (Target eachTarget : otherAggregationFunctionTargets) {
    -        targets[targetIdx++] = eachTarget;
    +        targets.add(eachTarget);
    --- End diff --
    
    You can simply use ```addAll()```.


---
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