public TableDesc getTableDesc(ScanNode scanNode) { return tableDescMap.get(scanNode.getPID()); }
public TableDesc getTableDesc(ScanNode scanNode) { return tableDescMap.get(scanNode.getPID()); }
@Override public LogicalNode visitScan(GlobalPlanContext context, LogicalPlan plan, LogicalPlan.QueryBlock queryBlock, ScanNode node, Stack<LogicalNode> stack) throws TajoException { ExecutionBlock newExecBlock = context.plan.newExecutionBlock(); newExecBlock.setPlan(node); context.execBlockMap.put(node.getPID(), newExecBlock); return node; }
@Override public LogicalNode visitScan(GlobalPlanContext context, LogicalPlan plan, LogicalPlan.QueryBlock queryBlock, ScanNode node, Stack<LogicalNode> stack) throws TajoException { ExecutionBlock newExecBlock = context.plan.newExecutionBlock(); newExecBlock.setPlan(node); context.execBlockMap.put(node.getPID(), newExecBlock); return node; }
public static String getUniqueKey(TaskAttemptContext context, ScanExec scanExec) { QueryId queryId = context.getTaskId().getTaskId().getExecutionBlockId().getQueryId(); int pid = scanExec.getScanNode().getPID(); return queryId.toString() + "_" + pid; } }
public static String getUniqueKey(TaskAttemptContext context, ScanExec scanExec) { QueryId queryId = context.getTaskId().getTaskId().getExecutionBlockId().getQueryId(); int pid = scanExec.getScanNode().getPID(); return queryId.toString() + "_" + pid; } }
for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc()); for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc()); for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc());
for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc()); for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc()); for (LogicalNode eachScanNode : scanNodes) { ScanNode scanNode = (ScanNode) eachScanNode; tableDescMap.put(scanNode.getPID(), scanNode.getTableDesc());
/** * Replace a child of the given parent logical node with the new one. * * @param newChild * @param originalChild * @param parent */ public static void replaceChild(LogicalNode newChild, ScanNode originalChild, LogicalNode parent) { if (parent instanceof UnaryNode) { ((UnaryNode) parent).setChild(newChild); } else if (parent instanceof BinaryNode) { BinaryNode binary = (BinaryNode) parent; if (binary.getLeftChild().equals(originalChild)) { binary.setLeftChild(newChild); } else if (binary.getRightChild().equals(originalChild)) { binary.setRightChild(newChild); } else { throw new TajoInternalError(originalChild.getPID() + " is not a child of " + parent.getPID()); } } else { throw new TajoInternalError(parent.getPID() + " seems to not have any children"); } }
/** * Replace a child of the given parent logical node with the new one. * * @param newChild * @param originalChild * @param parent */ public static void replaceChild(LogicalNode newChild, ScanNode originalChild, LogicalNode parent) { if (parent instanceof UnaryNode) { ((UnaryNode) parent).setChild(newChild); } else if (parent instanceof BinaryNode) { BinaryNode binary = (BinaryNode) parent; if (binary.getLeftChild().equals(originalChild)) { binary.setLeftChild(newChild); } else if (binary.getRightChild().equals(originalChild)) { binary.setRightChild(newChild); } else { throw new TajoInternalError(originalChild.getPID() + " is not a child of " + parent.getPID()); } } else { throw new TajoInternalError(parent.getPID() + " seems to not have any children"); } }