secondPhaseGroupBy.setAggFunctions(secondPhaseEvals); firstPhaseGroupBy.setAggFunctions(firstPhaseEvals); List<Target> firstPhaseTargets = ProjectionPushDownRule.buildGroupByTarget(firstPhaseGroupBy, null, firstPhaseEvalNames);
eachGroupbyNode.setAggFunctions(groupbyAggFunctions); eachGroupbyNode.setDistinct(true); eachGroupbyNode.setInSchema(groupbyNode.getInSchema()); otherGroupbyNode.setAggFunctions(otherAggregationFunctionCallEvals); otherGroupbyNode.setInSchema(groupbyNode.getInSchema());
groupbyNode.setAggFunctions(aggEvals.toArray(new AggregationFunctionCallEval[aggEvals.size()])); Target [] targets = ProjectionPushDownRule.buildGroupByTarget(groupbyNode, null, aggEvalNames.toArray(new String[aggEvalNames.size()]));
secondPhaseGroupBy.setAggFunctions(secondPhaseEvals); firstPhaseGroupBy.setAggFunctions(firstPhaseEvals); Target [] firstPhaseTargets = ProjectionPushDownRule.buildGroupByTarget(firstPhaseGroupBy, null, firstPhaseEvalNames);
groupbyNode.setAggFunctions(new ArrayList<>(aggEvals)); List<Target> targets = ProjectionPushDownRule.buildGroupByTarget(groupbyNode, null, aggEvalNames.toArray(new String[aggEvalNames.size()]));
eachGroupbyNode.setAggFunctions(groupbyAggFunctions); eachGroupbyNode.setDistinct(true); eachGroupbyNode.setInSchema(groupbyNode.getInSchema()); otherGroupbyNode.setAggFunctions(otherAggregationFunctionCallEvals); otherGroupbyNode.setInSchema(groupbyNode.getInSchema());
eachGroupbyNode.setAggFunctions(groupbyAggFunctions.toArray(new AggregationFunctionCallEval[]{})); eachGroupbyNode.setDistinct(true); eachGroupbyNode.setInSchema(groupbyNode.getInSchema()); otherGroupbyNode.setAggFunctions(otherAggregationFunctionCallEvals.toArray(new AggregationFunctionCallEval[]{})); otherGroupbyNode.setInSchema(groupbyNode.getInSchema());
node.setAggFunctions(aggEvals);
groupingNode.setAggFunctions(aggEvalNodes);
firstStageGroupbyNode.setAggFunctions(PlannerUtil.EMPTY_AGG_FUNCS); aggFunctions.addAll(otherGroupbyNode.getAggFunctions()); lastSecondStageGroupbyNode.setAggFunctions(aggFunctions);
eachGroupbyNode.setAggFunctions(groupbyAggFunctions.toArray(new AggregationFunctionCallEval[]{})); eachGroupbyNode.setDistinct(true); eachGroupbyNode.setInSchema(groupbyNode.getInSchema()); otherGroupbyNode.setAggFunctions(otherAggregationFunctionCallEvals.toArray(new AggregationFunctionCallEval[]{})); otherGroupbyNode.setInSchema(groupbyNode.getInSchema());
groupingNode.setAggFunctions(aggEvalNodes.toArray(new AggregationFunctionCallEval[aggEvalNodes.size()]));
firstStageGroupby.setAggFunctions(firstStageAggFunctions); firstStageGroupby.setTargets(firstStageTargets); firstStageGroupby.setChild(groupbyNode.getChild()); secondPhaseGroupby.setAggFunctions(secondPhaseEvalNodes); secondPhaseGroupby.setTargets(groupbyNode.getTargets());
firstStageGroupby.setAggFunctions(TUtil.toArray(firstStageAggFunctions, AggregationFunctionCallEval.class)); firstStageGroupby.setTargets(firstStageTargets); firstStageGroupby.setChild(groupbyNode.getChild()); secondPhaseGroupby.setAggFunctions(TUtil.toArray(secondPhaseEvalNodes, AggregationFunctionCallEval.class)); secondPhaseGroupby.setTargets(groupbyNode.getTargets());
firstStageGroupbyNode.setAggFunctions(PlannerUtil.EMPTY_AGG_FUNCS); lastSecondStageGroupbyNode.getAggFunctions().length, otherGroupbyNode.getAggFunctions().length); lastSecondStageGroupbyNode.setAggFunctions(aggFunctions);
node.setAggFunctions(aggEvals);
private static GroupbyNode convertGroupby(OverridableConf context, EvalContext evalContext, Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.GroupbyNode groupbyProto = protoNode.getGroupby(); GroupbyNode groupby = new GroupbyNode(protoNode.getNodeId()); groupby.setChild(nodeMap.get(groupbyProto.getChildSeq())); groupby.setDistinct(groupbyProto.getDistinct()); if (groupbyProto.getGroupingKeysCount() > 0) { groupby.setGroupingColumns(convertColumns(groupbyProto.getGroupingKeysList())); } if (groupbyProto.getAggFunctionsCount() > 0) { groupby.setAggFunctions(convertAggFuncCallEvals(context, evalContext, groupbyProto.getAggFunctionsList())); } if (groupbyProto.getTargetsCount() > 0) { groupby.setTargets(convertTargets(context, evalContext, groupbyProto.getTargetsList())); } groupby.setInSchema(convertSchema(protoNode.getInSchema())); groupby.setOutSchema(convertSchema(protoNode.getOutSchema())); return groupby; }
private static GroupbyNode convertGroupby(OverridableConf context, EvalContext evalContext, Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.GroupbyNode groupbyProto = protoNode.getGroupby(); GroupbyNode groupby = new GroupbyNode(protoNode.getNodeId()); groupby.setChild(nodeMap.get(groupbyProto.getChildSeq())); groupby.setDistinct(groupbyProto.getDistinct()); if (groupbyProto.getGroupingKeysCount() > 0) { groupby.setGroupingColumns(convertColumns(groupbyProto.getGroupingKeysList())); } if (groupbyProto.getAggFunctionsCount() > 0) { groupby.setAggFunctions(convertAggFuncCallEvals(context, evalContext, groupbyProto.getAggFunctionsList())); } if (groupbyProto.getTargetsCount() > 0) { groupby.setTargets(convertTargets(context, evalContext, groupbyProto.getTargetsList())); } groupby.setInSchema(convertSchema(protoNode.getInSchema())); groupby.setOutSchema(convertSchema(protoNode.getOutSchema())); return groupby; }
groupbyNode.setAggFunctions(aggFunctions);
groupbyNode.setAggFunctions(aggFunctions);