@Override public Object clone() throws CloneNotSupportedException { GroupbyNode grp = (GroupbyNode) super.clone(); if (groupingKeys != null) { grp.groupingKeys = new Column[groupingKeys.length]; System.arraycopy(groupingKeys, 0, grp.groupingKeys, 0, groupingKeys.length); } if (aggrFunctions != null) { grp.aggrFunctions = new ArrayList<>(); for (int i = 0; i < aggrFunctions.size(); i++) { grp.aggrFunctions.add((AggregationFunctionCallEval) aggrFunctions.get(i).clone()); } } if (targets != null) { grp.targets = new ArrayList<>(); for (Target t : targets) { grp.targets.add((Target) t.clone()); } } return grp; }
@Override public Object clone() throws CloneNotSupportedException { WindowFunctionEval windowFunctionEval = (WindowFunctionEval) super.clone(); if (sortSpecs != null) { windowFunctionEval.sortSpecs = new SortSpec[sortSpecs.length]; for (int i = 0; i < sortSpecs.length; i++) { windowFunctionEval.sortSpecs[i] = (SortSpec) sortSpecs[i].clone(); } } windowFunctionEval.windowFrame = windowFrame.clone(); return windowFunctionEval; }
@Override public Object clone() throws CloneNotSupportedException { WindowFunctionEval windowFunctionEval = (WindowFunctionEval) super.clone(); if (sortSpecs != null) { windowFunctionEval.sortSpecs = new SortSpec[sortSpecs.length]; for (int i = 0; i < sortSpecs.length; i++) { windowFunctionEval.sortSpecs[i] = (SortSpec) sortSpecs[i].clone(); } } windowFunctionEval.windowFrame = windowFrame.clone(); return windowFunctionEval; }
@Override public Object clone() throws CloneNotSupportedException { GroupbyNode grp = (GroupbyNode) super.clone(); if (groupingKeys != null) { grp.groupingKeys = new Column[groupingKeys.length]; System.arraycopy(groupingKeys, 0, grp.groupingKeys, 0, groupingKeys.length); } if (aggrFunctions != null) { grp.aggrFunctions = new AggregationFunctionCallEval[aggrFunctions.length]; for (int i = 0; i < aggrFunctions.length; i++) { grp.aggrFunctions[i] = (AggregationFunctionCallEval) aggrFunctions[i].clone(); } } if (targets != null) { grp.targets = new Target[targets.length]; for (int i = 0; i < targets.length; i++) { grp.targets[i] = (Target) targets[i].clone(); } } return grp; }
for (int i = 0; i < evalNum; i++) { try { firstPhaseEvals.add((AggregationFunctionCallEval) secondPhaseEvals.get(i).clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e);
for (int i = 0; i < evalNum; i++) { try { firstPhaseEvals[i] = (AggregationFunctionCallEval) secondPhaseEvals[i].clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e);
aggFunctions.add((AggregationFunctionCallEval) groupbyNode.getAggFunctions().get(i).clone()); aggFunctions.get(i).setFirstPhase();
aggFunctions[i] = (AggregationFunctionCallEval) groupbyNode.getAggFunctions()[i].clone(); aggFunctions[i].setFirstPhase();