Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.Group


        if (!curTable.isRoot()) {
            throw new DropGroupNotRootException (tableName);
        }
       
        final Group root = curTable.getGroup();
        for (Table table : ais.getTables().values()) {
            if (table.getGroup() == root) {
                ViewDDL.checkDropTable(ddlFunctions, session, table.getName());
                checkForeignKeyDropTable(table);
            }
        }
        ddlFunctions.dropGroup(session, root.getName());
    }
View Full Code Here


                .on("table_id", "table_id")
                .and("index_id", "index_id");

        // Statistics service relies on decoding rowdata manually
        if (schemaManager instanceof FDBSchemaManager) {
            Group istn = builder.unvalidatedAIS().getTable(INDEX_STATISTICS_TABLE_NAME).getGroup();
            istn.setStorageDescription(new FDBStorageDescription(istn, "rowdata"));

            Collection<TableIndex> collection = builder.unvalidatedAIS().getTable(INDEX_STATISTICS_TABLE_NAME).getIndexes();
            for (TableIndex ti : collection) {
                ti.setStorageDescription(new FDBStorageDescription(ti, "rowdata"));
            }

            Group isetn = builder.unvalidatedAIS().getTable(INDEX_STATISTICS_ENTRY_TABLE_NAME).getGroup();
            isetn.setStorageDescription(new FDBStorageDescription(isetn, "rowdata"));

            Collection<TableIndex> collection_isetn = builder.unvalidatedAIS().getTable(INDEX_STATISTICS_ENTRY_TABLE_NAME).getIndexes();
            for (TableIndex ti : collection_isetn) {
                ti.setStorageDescription(new FDBStorageDescription(ti, "rowdata"));
            }
View Full Code Here

                AkibanInformationSchema ais = schemaManager.getAis(session);
                Table table = ais.getTable(indexName.getFullTableName());
                if (table != null)
                    index = table.getIndex(indexName.getName());
                if (index == null) {
                    Group group = ais.getGroup(indexName.getFullTableName());
                    if (group != null)
                        index = group.getIndex(indexName.getName());
                }
                if (index == null) return; // Could have been dropped in the meantime.
                statistics = updateIndexStatistics(session, Collections.singletonList(index), true);
                txn.commit();
                log.info("Automatically updated statistics for {}", indexName);
View Full Code Here

   
    private Operator computePlan()
    {
        Operator ret = null;

        Group group = indexedRowType.table().getGroup();
        Set<TableRowType> ancestors = new HashSet<>();
        boolean hasDesc = false;

        for (IndexColumn ic : index.getKeyColumns())
        {
View Full Code Here

        protected Deque<EquivalenceFinder<ColumnExpression>> columnEquivalences
                = new ArrayDeque<>(1);

        protected TableNode getTableNode(Table table)
                throws StandardException {
            Group group = table.getGroup();
            TableTree tables = groups.get(group);
            if (tables == null) {
                tables = new TableTree();
                groups.put(group, tables);
            }
View Full Code Here

                return 0;
        }

        protected RowStream assembleGroupScan(GroupScan groupScan) {
            RowStream stream = new RowStream();
            Group group = groupScan.getGroup().getGroup();
            stream.operator = API.groupScan_Default(group);
            stream.unknownTypesPresent = true;
            return stream;
        }
View Full Code Here

            return stream;
        }

        protected RowStream assembleAncestorLookup(AncestorLookup ancestorLookup) {
            RowStream stream;
            Group group = ancestorLookup.getDescendant().getGroup();
            List<TableRowType> outputRowTypes =
                new ArrayList<>(ancestorLookup.getAncestors().size());
            for (TableNode table : ancestorLookup.getAncestors()) {
                outputRowTypes.add(tableRowType(table));
            }
View Full Code Here

            return stream;
        }

        protected RowStream assembleBranchLookup(BranchLookup branchLookup) {
            RowStream stream;
            Group group = branchLookup.getSource().getGroup();
            List<TableRowType> outputRowTypes =
                new ArrayList<>(branchLookup.getTables().size());
            if (false)      // TODO: Any way to check that this matched?
                outputRowTypes.add(tableRowType(branchLookup.getBranch()));
            for (TableSource table : branchLookup.getTables()) {
View Full Code Here

    }
   
    protected static int compareTableSources(TableSource ts1, TableSource ts2) {
        TableNode t1 = ts1.getTable();
        Table ut1 = t1.getTable();
        Group g1 = ut1.getGroup();
        TableGroup tg1 = ts1.getGroup();
        TableNode t2 = ts2.getTable();
        Table ut2 = t2.getTable();
        Group g2 = ut2.getGroup();
        TableGroup tg2 = ts2.getGroup();
        if (g1 != g2)
            return g1.getName().compareTo(g2.getName());
        if (tg1 == tg2) {       // Including null because not yet computed.
            if (ut1 == ut2)
                return ts1.getName().compareTo(ts2.getName());
            return t1.getOrdinal() - t2.getOrdinal();
        }
View Full Code Here

    }

    protected static int compareJoinables(Joinable j1, Joinable j2) {
        if (j1.isTable() && j2.isTable())
            return compareTableSources((TableSource)j1, (TableSource)j2);
        Group g1 = singleGroup(j1);
        Group g2 = singleGroup(j2);
        if (g1 == null) {
            if (g2 != null)
                return -1;
            else
                return 0;
        }
        else if (g2 == null)
            return +1;
        if (g1 != g2)
            return g1.getName().compareTo(g2.getName());
        int[] range1 = ordinalRange(j1);
        int[] range2 = ordinalRange(j2);
        if (range1[1] < range2[0])
            return -1;
        else if (range1[0] > range2[1])
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.Group

Copyright © 2018 www.massapicom. 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.