@Override public PhysicalOperation visitDelete(DeleteNode node, LocalExecutionPlanContext context) { PhysicalOperation source = node.getSource().accept(this, context); OperatorFactory operatorFactory = new DeleteOperatorFactory(context.getNextOperatorId(), node.getId(), source.getLayout().get(node.getRowId())); Map<Symbol, Integer> layout = ImmutableMap.<Symbol, Integer>builder() .put(node.getOutputSymbols().get(0), 0) .put(node.getOutputSymbols().get(1), 1) .build(); return new PhysicalOperation(operatorFactory, layout, context, source); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Set<Symbol>> context) { PlanNode source = context.rewrite(node.getSource(), ImmutableSet.of(node.getRowId())); return new DeleteNode(node.getId(), source, node.getTarget(), node.getRowId(), node.getOutputSymbols()); }
@Override public Void visitDelete(DeleteNode node, Integer indent) { print(indent, "- Delete[%s] => [%s]", node.getTarget(), formatOutputs(node.getOutputSymbols())); printPlanNodesStatsAndCost(indent + 2, node); printStats(indent + 2, node.getId()); return processChildren(node, indent + 1); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Context> context) { TableWriterNode.DeleteHandle deleteHandle = (TableWriterNode.DeleteHandle) context.get().getMaterializedHandle(node.getTarget()).get(); return new DeleteNode( node.getId(), rewriteDeleteTableScan(node.getSource(), deleteHandle.getHandle()), deleteHandle, node.getRowId(), node.getOutputSymbols()); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Void> context) { return new DeleteNode(node.getId(), context.rewrite(node.getSource()), node.getTarget(), canonicalize(node.getRowId()), node.getOutputSymbols()); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Void> context) { // For delete queries, the TableScan node that corresponds to the table being deleted must be collocated with the Delete node, // so you can't do a distributed semi-join isDeleteQuery = true; PlanNode rewrittenSource = context.rewrite(node.getSource()); return new DeleteNode( node.getId(), rewrittenSource, node.getTarget(), node.getRowId(), node.getOutputSymbols()); } }
@Override public Void visitDelete(DeleteNode node, Void context) { node.getSource().accept(this, context); builder.addAll(node.getOutputSymbols()); return null; }
@Override public PhysicalOperation visitDelete(DeleteNode node, LocalExecutionPlanContext context) { PhysicalOperation source = node.getSource().accept(this, context); OperatorFactory operatorFactory = new DeleteOperatorFactory(context.getNextOperatorId(), node.getId(), source.getLayout().get(node.getRowId())); Map<Symbol, Integer> layout = ImmutableMap.<Symbol, Integer>builder() .put(node.getOutputSymbols().get(0), 0) .put(node.getOutputSymbols().get(1), 1) .build(); return new PhysicalOperation(operatorFactory, layout, source); }
@Override public PlanNode visitDelete(DeleteNode node, List<PlanNode> newChildren) { return new DeleteNode(node.getId(), Iterables.getOnlyElement(newChildren), node.getTarget(), node.getRowId(), node.getOutputSymbols()); }
@Override public Void visitDelete(DeleteNode node, Integer indent) { print(indent, "- Delete[%s] => [%s]", node.getTarget(), formatOutputs(node.getOutputSymbols())); return processChildren(node, indent + 1); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Set<Symbol>> context) { PlanNode source = context.rewrite(node.getSource(), ImmutableSet.of(node.getRowId())); return new DeleteNode(node.getId(), source, node.getTarget(), node.getRowId(), node.getOutputSymbols()); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Context> context) { TableWriterNode.DeleteHandle deleteHandle = (TableWriterNode.DeleteHandle) context.get().getMaterializedHandle(node.getTarget()).get(); return new DeleteNode( node.getId(), rewriteDeleteTableScan(node.getSource(), deleteHandle.getHandle(), context), deleteHandle, node.getRowId(), node.getOutputSymbols()); }
@Override public PlanNode visitDelete(DeleteNode node, RewriteContext<Void> context) { return new DeleteNode(node.getId(), context.rewrite(node.getSource()), node.getTarget(), canonicalize(node.getRowId()), node.getOutputSymbols()); }