public Schema getOutputSchema() { return getRootNode().getOutSchema(); }
public Schema getOutputSchema() { return getRootNode().getOutSchema(); }
@Override public boolean isEligible(LogicalPlanRewriteRuleContext context) { for (LogicalNode eachNode : PlannerUtil.findAllNodes(context.getPlan().getRootNode(), NodeType.SELECTION)) { SelectionNode selectionNode = (SelectionNode) eachNode; if (!extractInSubquery(selectionNode.getQual()).isEmpty()) { return true; } } return false; }
@Override public boolean isEligible(LogicalPlanRewriteRuleContext context) { for (LogicalNode eachNode : PlannerUtil.findAllNodes(context.getPlan().getRootNode(), NodeType.SELECTION)) { SelectionNode selectionNode = (SelectionNode) eachNode; if (!extractInSubquery(selectionNode.getQual()).isEmpty()) { return true; } } return false; }
public static TableDesc getOutputTableDesc(LogicalPlan plan) { LogicalNode [] found = findAllNodes(plan.getRootNode().getChild(), NodeType.CREATE_TABLE, NodeType.INSERT); if (found.length == 0) { return new TableDesc(null, plan.getRootNode().getOutSchema(), "TEXT", new KeyValueSet(), null); } else { StoreTableNode storeNode = (StoreTableNode) found[0]; return new TableDesc( storeNode.getTableName(), storeNode.getOutSchema(), storeNode.getStorageType(), storeNode.getOptions(), storeNode.getUri()); } }
public static TableDesc getOutputTableDesc(LogicalPlan plan) { LogicalNode [] found = findAllNodes(plan.getRootNode().getChild(), NodeType.CREATE_TABLE, NodeType.INSERT); if (found.length == 0) { return new TableDesc(null, plan.getRootNode().getOutSchema(), "TEXT", new KeyValueSet(), null); } else { StoreTableNode storeNode = (StoreTableNode) found[0]; return new TableDesc( storeNode.getTableName(), storeNode.getOutSchema(), storeNode.getStorageType(), storeNode.getOptions(), storeNode.getUri()); } }
LogicalPlan logicalPlan = planner.createPlan(context, expr); LogicalNode node = logicalPlan.getRootNode(); assertEquals(NodeType.ROOT, node.getType()); LogicalRootNode root = (LogicalRootNode) node;
LogicalPlan logicalPlan = planner.createPlan(context, expr); LogicalNode node = logicalPlan.getRootNode(); assertEquals(NodeType.ROOT, node.getType()); LogicalRootNode root = (LogicalRootNode) node;