@Override public RESULT visitLimit(CONTEXT context, LogicalPlan plan, LogicalPlan.QueryBlock block, LimitNode node, Stack<LogicalNode> stack) throws TajoException { stack.push(node); RESULT result = visit(context, plan, block, node.getChild(), stack); stack.pop(); return result; }
public LimitExec(TaskAttemptContext context, Schema inSchema, Schema outSchema, PhysicalExec child, LimitNode limit) { super(context, inSchema, outSchema, child); this.fetchFirstNum = limit.getFetchFirstNum(); this.fetchCount = 0; }
@Override public LogicalNode visitLimit(ProcessorContext ctx, Stack<Expr> stack, Limit expr) throws TajoException { super.visitLimit(ctx, stack, expr); LimitNode node = getNodeFromExpr(ctx.planContext.getPlan(), expr); LogicalNode child = getNonRelationListExpr(ctx.planContext.getPlan(), expr.getChild()); node.setInSchema(child.getOutSchema()); node.setOutSchema(node.getInSchema()); return node; }
public LogicalNode visitLimit(Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, LimitNode node, Stack<LogicalNode> stack) throws TajoException { LogicalNode child = super.visitLimit(context, plan, block, node, stack); node.setInSchema(child.getOutSchema()); node.setOutSchema(child.getOutSchema()); return node; }
private static LimitNode convertLimit(Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.LimitNode limitProto = protoNode.getLimit(); LimitNode limitNode = new LimitNode(protoNode.getNodeId()); limitNode.setChild(nodeMap.get(limitProto.getChildSeq())); limitNode.setInSchema(convertSchema(protoNode.getInSchema())); limitNode.setOutSchema(convertSchema(protoNode.getOutSchema())); limitNode.setFetchFirst(limitProto.getFetchFirstNum()); return limitNode; }
if (child.getType() == NodeType.LIMIT) { LimitNode limitNode = (LimitNode) child; windowAggNode.setChild(limitNode.getChild()); windowAggNode.setInSchema(limitNode.getChild().getOutSchema()); limitNode.setChild(windowAggNode); } else if (child.getType() == NodeType.SORT) { SortNode sortNode = (SortNode) child; limitNode.setInSchema(windowAggNode.getOutSchema()); limitNode.setOutSchema(windowAggNode.getOutSchema()); return null; } else if (child.getType() == NodeType.SORT) {
LimitNode limitNode = (LimitNode) logicalNode; stack.push(limitNode); leftExec = createPlanRecursive(ctx, limitNode.getChild(), stack); stack.pop(); return new LimitExec(ctx, limitNode.getInSchema(), limitNode.getOutSchema(), leftExec, limitNode);
execBlock = context.execBlockMap.remove(child.getPID()); if (child.getType() == NodeType.SORT) { node.setChild(execBlock.getPlan()); execBlock.setPlan(node); childLimit.setChild(childBlock.getPlan()); childBlock.setPlan(childLimit); context.execBlockMap.put(node.getPID(), execBlock); } else { node.setChild(execBlock.getPlan()); execBlock.setPlan(node); DataChannel newChannel = new DataChannel(execBlock, newExecBlock, HASH_SHUFFLE, 1); newChannel.setShuffleKeys(new Column[]{}); newChannel.setSchema(node.getOutSchema()); newChannel.setDataFormat(dataFormat); parentLimit.setChild(scanNode); newExecBlock.setPlan(parentLimit); context.plan.addConnect(newChannel); context.execBlockMap.put(parentLimit.getPID(), newExecBlock); node = parentLimit;
private static LimitNode convertLimit(Map<Integer, LogicalNode> nodeMap, PlanProto.LogicalNode protoNode) { PlanProto.LimitNode limitProto = protoNode.getLimit(); LimitNode limitNode = new LimitNode(protoNode.getNodeId()); limitNode.setChild(nodeMap.get(limitProto.getChildSeq())); limitNode.setInSchema(convertSchema(protoNode.getInSchema())); limitNode.setOutSchema(convertSchema(protoNode.getOutSchema())); limitNode.setFetchFirst(limitProto.getFetchFirstNum()); return limitNode; }
if (child.getType() == NodeType.LIMIT) { LimitNode limitNode = (LimitNode) child; windowAggNode.setChild(limitNode.getChild()); windowAggNode.setInSchema(limitNode.getChild().getOutSchema()); limitNode.setChild(windowAggNode); } else if (child.getType() == NodeType.SORT) { SortNode sortNode = (SortNode) child; limitNode.setInSchema(windowAggNode.getOutSchema()); limitNode.setOutSchema(windowAggNode.getOutSchema()); return null; } else if (child.getType() == NodeType.SORT) {
LimitNode limitNode = (LimitNode) logicalNode; stack.push(limitNode); leftExec = createPlanRecursive(ctx, limitNode.getChild(), stack); stack.pop(); return new LimitExec(ctx, limitNode.getInSchema(), limitNode.getOutSchema(), leftExec, limitNode);
execBlock = context.execBlockMap.remove(child.getPID()); if (child.getType() == NodeType.SORT) { node.setChild(execBlock.getPlan()); execBlock.setPlan(node); childLimit.setChild(childBlock.getPlan()); childBlock.setPlan(childLimit); context.execBlockMap.put(node.getPID(), execBlock); } else { node.setChild(execBlock.getPlan()); execBlock.setPlan(node); DataChannel newChannel = new DataChannel(execBlock, newExecBlock, HASH_SHUFFLE, 1); newChannel.setShuffleKeys(new Column[]{}); newChannel.setSchema(node.getOutSchema()); newChannel.setDataFormat(dataFormat); parentLimit.setChild(scanNode); newExecBlock.setPlan(parentLimit); context.plan.addConnect(newChannel); context.execBlockMap.put(parentLimit.getPID(), newExecBlock); node = parentLimit;
public LogicalNode visitLimit(Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, LimitNode node, Stack<LogicalNode> stack) throws TajoException { LogicalNode child = super.visitLimit(context, plan, block, node, stack); node.setInSchema(child.getOutSchema()); node.setOutSchema(child.getOutSchema()); return node; }
limitNode.setChild(child); limitNode.setInSchema(child.getOutSchema()); limitNode.setOutSchema(child.getOutSchema()); limitNode.setFetchFirst(firstFetNum.eval(null).asInt8());
@Override public RESULT visitLimit(CONTEXT context, LogicalPlan plan, LogicalPlan.QueryBlock block, LimitNode node, Stack<LogicalNode> stack) throws TajoException { stack.push(node); RESULT result = visit(context, plan, block, node.getChild(), stack); stack.pop(); return result; }
public LimitExec(TaskAttemptContext context, Schema inSchema, Schema outSchema, PhysicalExec child, LimitNode limit) { super(context, inSchema, outSchema, child); this.fetchFirstNum = limit.getFetchFirstNum(); this.fetchCount = 0; }
@Override public LogicalNode visitLimit(ProcessorContext ctx, Stack<Expr> stack, Limit expr) throws TajoException { super.visitLimit(ctx, stack, expr); LimitNode node = getNodeFromExpr(ctx.planContext.getPlan(), expr); LogicalNode child = getNonRelationListExpr(ctx.planContext.getPlan(), expr.getChild()); node.setInSchema(child.getOutSchema()); node.setOutSchema(node.getInSchema()); return node; }
@Override public LogicalNode visitLimit(LogicalPlanner.PlanContext ctx, Stack<Expr> stack, Limit expr) throws TajoException { stack.push(expr); LogicalNode child = visit(ctx, stack, expr.getChild()); stack.pop(); LimitNode limitNode = ctx.getPlan().createNode(LimitNode.class); limitNode.setInSchema(child.getOutSchema()); limitNode.setOutSchema(child.getOutSchema()); return limitNode; }
limitNode.setChild(child); limitNode.setInSchema(child.getOutSchema()); limitNode.setOutSchema(child.getOutSchema()); limitNode.setFetchFirst(firstFetNum.eval(null).asInt8());
child = ((LimitNode)child).getChild();