@Override public LogicalNode visitHaving(GlobalPlanContext context, LogicalPlan plan, LogicalPlan.QueryBlock block, HavingNode node, Stack<LogicalNode> stack) throws TajoException { LogicalNode child = super.visitHaving(context, plan, block, node, stack); // Don't separate execution block. Having is pushed to the second grouping execution block. ExecutionBlock childBlock = context.execBlockMap.remove(child.getPID()); node.setChild(childBlock.getPlan()); childBlock.setPlan(node); context.execBlockMap.put(node.getPID(), childBlock); return node; }
@Override public LogicalNode visitHaving(GlobalPlanContext context, LogicalPlan plan, LogicalPlan.QueryBlock block, HavingNode node, Stack<LogicalNode> stack) throws TajoException { LogicalNode child = super.visitHaving(context, plan, block, node, stack); // Don't separate execution block. Having is pushed to the second grouping execution block. ExecutionBlock childBlock = context.execBlockMap.remove(child.getPID()); node.setChild(childBlock.getPlan()); childBlock.setPlan(node); context.execBlockMap.put(node.getPID(), childBlock); return node; }
block.registerNode(workingHavingNode); parentNode.setChild(workingHavingNode); workingHavingNode.setChild(groupByNode);
block.registerNode(workingHavingNode); parentNode.setChild(workingHavingNode); workingHavingNode.setChild(groupByNode);
private static HavingNode convertHaving(OverridableConf context, EvalContext evalContext, Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.FilterNode havingProto = protoNode.getFilter(); HavingNode having = new HavingNode(protoNode.getNodeId()); having.setChild(nodeMap.get(havingProto.getChildSeq())); having.setQual(EvalNodeDeserializer.deserialize(context, evalContext, havingProto.getQual())); having.setInSchema(convertSchema(protoNode.getInSchema())); having.setOutSchema(convertSchema(protoNode.getOutSchema())); return having; }
private static HavingNode convertHaving(OverridableConf context, EvalContext evalContext, Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.FilterNode havingProto = protoNode.getFilter(); HavingNode having = new HavingNode(protoNode.getNodeId()); having.setChild(nodeMap.get(havingProto.getChildSeq())); having.setQual(EvalNodeDeserializer.deserialize(context, evalContext, havingProto.getQual())); having.setInSchema(convertSchema(protoNode.getInSchema())); having.setOutSchema(convertSchema(protoNode.getOutSchema())); return having; }
having.setChild(child); having.setInSchema(child.getOutSchema()); having.setOutSchema(child.getOutSchema());
having.setChild(child); having.setInSchema(child.getOutSchema()); having.setOutSchema(child.getOutSchema());