@Override public String getCanonicalName() { return plan.getCanonicalName(); }
@Override public String getCanonicalName() { return plan.getCanonicalName(); }
@Override public String getCanonicalName() { return plan.getCanonicalName(); }
@Override public String getCanonicalName() { return plan.getCanonicalName(); }
public int getNonBroadcastRelNum() { int nonBroadcastRelNum = 0; for (ScanNode scanNode : planContext.scanlist) { if (!broadcastRelations.containsKey(scanNode.getCanonicalName())) { nonBroadcastRelNum++; } } return nonBroadcastRelNum; }
public int getNonBroadcastRelNum() { int nonBroadcastRelNum = 0; for (ScanNode scanNode : planContext.scanlist) { if (!broadcastRelations.containsKey(scanNode.getCanonicalName())) { nonBroadcastRelNum++; } } return nonBroadcastRelNum; }
public boolean isBroadcastRelation(ScanNode relationNode) { return broadcastRelations.containsKey(relationNode.getCanonicalName()); }
public boolean isBroadcastRelation(ScanNode relationNode) { return broadcastRelations.containsKey(relationNode.getCanonicalName()); }
public void addBroadcastRelation(ScanNode relationNode) { if (!broadcastRelations.containsKey(relationNode.getCanonicalName())) { enforcer.addBroadcast(relationNode.getCanonicalName()); } broadcastRelations.put(relationNode.getCanonicalName(), relationNode); }
public void addBroadcastRelation(ScanNode relationNode) { if (!broadcastRelations.containsKey(relationNode.getCanonicalName())) { enforcer.addBroadcast(relationNode.getCanonicalName()); } broadcastRelations.put(relationNode.getCanonicalName(), relationNode); }
public void removeBroadcastRelation(ScanNode relationNode) { broadcastRelations.remove(relationNode.getCanonicalName()); enforcer.removeBroadcast(relationNode.getCanonicalName()); }
public void removeBroadcastRelation(ScanNode relationNode) { broadcastRelations.remove(relationNode.getCanonicalName()); enforcer.removeBroadcast(relationNode.getCanonicalName()); }
/** * Get all RelationNodes which are descendant of a given LogicalNode. * * @param from The LogicalNode to start visiting LogicalNodes. * @return an array of all descendant RelationNode of LogicalNode. */ public static String[] getRelationLineage(LogicalNode from) { LogicalNode[] scans = findAllNodes(from, NodeType.SCAN, NodeType.PARTITIONS_SCAN); String[] tableNames = new String[scans.length]; ScanNode scan; for (int i = 0; i < scans.length; i++) { scan = (ScanNode) scans[i]; tableNames[i] = scan.getCanonicalName(); } return tableNames; }
/** * Get all RelationNodes which are descendant of a given LogicalNode. * * @param from The LogicalNode to start visiting LogicalNodes. * @return an array of all descendant RelationNode of LogicalNode. */ public static String[] getRelationLineage(LogicalNode from) { LogicalNode[] scans = findAllNodes(from, NodeType.SCAN, NodeType.PARTITIONS_SCAN); String[] tableNames = new String[scans.length]; ScanNode scan; for (int i = 0; i < scans.length; i++) { scan = (ScanNode) scans[i]; tableNames[i] = scan.getCanonicalName(); } return tableNames; }
private void updateDescsForScanNodes(NodeType nodeType) { assert nodeType == NodeType.SCAN || nodeType == NodeType.PARTITIONS_SCAN || nodeType == NodeType.INDEX_SCAN; LogicalNode[] scanNodes = PlannerUtil.findAllNodes(plan, nodeType); if (scanNodes != null) { for (LogicalNode node : scanNodes) { ScanNode scanNode = (ScanNode) node; descs.put(scanNode.getCanonicalName(), scanNode.getTableDesc()); } } }
private void updateDescsForScanNodes(NodeType nodeType) { assert nodeType == NodeType.SCAN || nodeType == NodeType.PARTITIONS_SCAN || nodeType == NodeType.INDEX_SCAN; LogicalNode[] scanNodes = PlannerUtil.findAllNodes(plan, nodeType); if (scanNodes != null) { for (LogicalNode node : scanNodes) { ScanNode scanNode = (ScanNode) node; descs.put(scanNode.getCanonicalName(), scanNode.getTableDesc()); } } }
/** * It creates a number of fragments for all partitions. */ private static List<Fragment> getFragmentsFromPartitionedTable(Tablespace tsHandler, ScanNode scan, TableDesc table, boolean requireSort) throws IOException { Preconditions.checkArgument(tsHandler instanceof FileTablespace, "tsHandler must be FileTablespace"); if (!(scan instanceof PartitionedTableScanNode)) { throw new IllegalArgumentException("scan should be a PartitionedTableScanNode type."); } List<Fragment> fragments = Lists.newArrayList(); PartitionedTableScanNode partitionsScan = (PartitionedTableScanNode) scan; fragments.addAll(((FileTablespace) tsHandler).getSplits( scan.getCanonicalName(), table.getMeta(), table.getSchema(), requireSort, partitionsScan.getInputPaths())); return fragments; }
/** * It creates a number of fragments for all partitions. */ public static List<Fragment> getFragmentsFromPartitionedTable(Tablespace tsHandler, ScanNode scan, TableDesc table) throws IOException { Preconditions.checkArgument(tsHandler instanceof FileTablespace, "tsHandler must be FileTablespace"); if (!(scan instanceof PartitionedTableScanNode)) { throw new IllegalArgumentException("scan should be a PartitionedTableScanNode type."); } List<Fragment> fragments = Lists.newArrayList(); PartitionedTableScanNode partitionsScan = (PartitionedTableScanNode) scan; fragments.addAll(((FileTablespace) tsHandler).getSplits( scan.getCanonicalName(), table.getMeta(), table.getSchema(), partitionsScan.getInputPaths())); partitionsScan.setInputPaths(null); return fragments; }
fragments = tablespace.getSplits(scan.getCanonicalName(), tableDesc, requireSort, scan.getQual());
private void assertJoinNode(LogicalNode node, String left, String right) { assertEquals(NodeType.JOIN, node.getType()); JoinNode joinNode = (JoinNode)node; if (left != null) { assertEquals(left, ((ScanNode)joinNode.getLeftChild()).getCanonicalName()); } else { assertEquals(NodeType.JOIN, joinNode.getLeftChild().getType()); } if (right != null) { assertEquals(right, ((ScanNode)joinNode.getRightChild()).getCanonicalName()); } else { assertEquals(NodeType.JOIN, joinNode.getRightChild().getType()); } } }