@Override public RESULT visitCreateIndex(CONTEXT context, LogicalPlan plan, LogicalPlan.QueryBlock block, CreateIndexNode node, Stack<LogicalNode> stack) throws TajoException { RESULT result = null; stack.push(node); result = visit(context, plan, block, node.getChild(), stack); stack.pop(); return result; }
@Override public RESULT visitCreateIndex(CONTEXT context, LogicalPlan plan, LogicalPlan.QueryBlock block, CreateIndexNode node, Stack<LogicalNode> stack) throws TajoException { RESULT result = null; stack.push(node); result = visit(context, plan, block, node.getChild(), stack); stack.pop(); return result; }
CreateIndexNode createIndexNode = (CreateIndexNode) logicalNode; stack.push(createIndexNode); leftExec = createPlanRecursive(ctx, createIndexNode.getChild(), stack); stack.pop(); return new StoreIndexExec(ctx, createIndexNode, leftExec);
CreateIndexNode createIndexNode = (CreateIndexNode) logicalNode; stack.push(createIndexNode); leftExec = createPlanRecursive(ctx, createIndexNode.getChild(), stack); stack.pop(); return new StoreIndexExec(ctx, createIndexNode, leftExec);
@Test public final void testCreateIndexNode() throws TajoException { QueryContext qc = new QueryContext(util.getConfiguration(), session); Expr expr = sqlAnalyzer.parse(QUERIES[11]); LogicalPlan rootNode = planner.createPlan(qc, expr); LogicalNode plan = rootNode.getRootBlock().getRoot(); LogicalRootNode root = (LogicalRootNode) plan; assertEquals(NodeType.CREATE_INDEX, root.getChild().getType()); CreateIndexNode createIndexNode = root.getChild(); assertEquals(NodeType.PROJECTION, createIndexNode.getChild().getType()); ProjectionNode projNode = createIndexNode.getChild(); assertEquals(NodeType.SELECTION, projNode.getChild().getType()); SelectionNode selNode = projNode.getChild(); assertEquals(NodeType.SCAN, selNode.getChild().getType()); ScanNode scanNode = selNode.getChild(); assertEquals(IdentifierUtil.buildFQName(DEFAULT_DATABASE_NAME, "employee"), scanNode.getTableName()); }