Examples of AbstractPlanNode


Examples of org.voltdb.plannodes.AbstractPlanNode

    public static Collection<Table> getReferencedTables(Statement catalog_stmt) {
        final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt);
        Collection<Table> ret = cache.STATEMENT_TABLES.get(catalog_stmt);
        if (ret == null) {
            Database catalog_db = CatalogUtil.getDatabase(catalog_stmt);
            AbstractPlanNode node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
            Collection<Table> tables = CatalogUtil.getReferencedTablesForTree(catalog_db, node);
            ret = Collections.unmodifiableCollection(tables);
            // cache.STATEMENT_TABLES.put(catalog_stmt, ret);
        }
        return (ret);
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

     * Returns all the indexes access/modified in the given Statement's query
     * @param catalog_stmt
     */
    public static Collection<Index> getReferencedIndexes(Statement catalog_stmt) {
        Database catalog_db = CatalogUtil.getDatabase(catalog_stmt);
        AbstractPlanNode node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
        Collection<Index> indexes = CatalogUtil.getReferencedIndexesForTree(catalog_db, node);
        return (Collections.unmodifiableCollection(indexes));
    }
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

     * Get all the tables referenced in this PlanFragment
     * @param catalog_fag
     */
    public static Collection<Table> getReferencedTables(PlanFragment catalog_frag) {
        Database catalog_db = CatalogUtil.getDatabase(catalog_frag);
        AbstractPlanNode node = PlanNodeUtil.getPlanNodeTreeForPlanFragment(catalog_frag);
        return (CatalogUtil.getReferencedTablesForTree(catalog_db, node));
    }
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

            Set<Column> readOnly = new TreeSet<Column>(comparator);

            // 2010-07-14: Always use the AbstractPlanNodes from the PlanFragments
            // to figure out what columns the query touches. It's more accurate
            // because we will pick apart plan nodes and expression trees to figure things out
            AbstractPlanNode node = null;
            Set<Column> columns = null;
            try {
                node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
                columns = CatalogUtil.getReferencedColumnsForTree(catalog_db, node, ret, modified, readOnly);
            } catch (Throwable ex) {
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

        Set<Column> ret = cache.STATEMENT_ORDERBY_COLUMNS.get(catalog_stmt);
        if (ret == null) {
            Database catalog_db = CatalogUtil.getDatabase(catalog_stmt);
            ret = new ListOrderedSet<Column>();
            try {
                AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
                assert (root != null);
                PlannerContext context = PlannerContext.singleton();
                for (OrderByPlanNode node : PlanNodeUtil.getPlanNodes(root, OrderByPlanNode.class)) {
                    for (Integer guid : node.getSortColumnGuids()) {
                        PlanColumn pcol = context.get(guid);
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

        final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt);
        Pair<String, Collection<String>> key = Pair.of(CatalogKey.createKey(catalog_stmt), table_keys);
        PredicatePairs cset = cache.EXTRACTED_PREDICATES.get(key);
        if (cset == null) {
            cset = new PredicatePairs();
            AbstractPlanNode root_node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);

            try {
                // WHERE Clause
                if (catalog_stmt.getExptree() != null && !catalog_stmt.getExptree().isEmpty()) {
                    AbstractExpression root_exp = ExpressionUtil.deserializeExpression(catalog_db, catalog_stmt.getExptree());
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

        final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt);
        Pair<String, Collection<String>> key = Pair.of(CatalogKey.createKey(catalog_stmt), table_keys);
        PredicatePairs cset = cache.EXTRACTED_PREDICATES.get(key);
        if (cset == null) {
            cset = new PredicatePairs();
            AbstractPlanNode root_node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
            CatalogUtil.extractUpdatePredicates(catalog_stmt, catalog_db, cset, root_node, convert_params, tables);
            cache.EXTRACTED_PREDICATES.put(key, cset);
        }
        return (cset);
    }
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

            LOG.debug("Extracting column set for fragment #" + catalog_frag.getName() + ": " + catalog_tables);
        final CatalogUtil.Cache cache = CatalogUtil.getCatalogCache(catalog_stmt);
        Pair<String, Collection<String>> key = Pair.of(CatalogKey.createKey(catalog_frag), table_keys);
        PredicatePairs cset = cache.EXTRACTED_PREDICATES.get(key);
        if (cset == null) {
            AbstractPlanNode root_node = PlanNodeUtil.getPlanNodeTreeForPlanFragment(catalog_frag);
            // LOG.debug("PlanFragment Node:\n" +
            // PlanNodeUtil.debug(root_node));
            cset = new PredicatePairs();
            CatalogUtil.extractPlanNodePredicates(catalog_stmt, catalog_db, cset, root_node, convert_params, catalog_tables);
            cache.EXTRACTED_PREDICATES.put(key, cset);
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

                    String stmtName = catalog_stmt.getName();
                    if (vc.isUpdateApplied() == false)
                        vc.applyUpdate();

                    catalog_stmt = catalog_proc.getStatements().get(stmtName);
                    AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, false);
                    if (debug)
                        LOG.debug(catalog_stmt.fullName() + "\n" + PlanNodeUtil.debug(root));
                    clearCache = true;
                }
            } // FOR
View Full Code Here

Examples of org.voltdb.plannodes.AbstractPlanNode

     * @param tables
     * @param cols
     * @return
     */
    private boolean alwaysReadWriteConflicting(Statement stmt, Collection<Table> tables) {
        AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(stmt, true);
       
        // Any join is always conflicting... it's just easier
        // XXX: If target table referenced in the WRITE query is referenced using
        //      only equality predicates on the primary key, then there won't be a conflict
        if (tables.size() > 1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.