Package org.voltdb.catalog

Examples of org.voltdb.catalog.Column.fullName()


                    CatalogType other = entry.getOther(catalog_col);
                    assertNotNull(other);
                    if ((other instanceof Column) == false) continue;
                    Column other_col = (Column)other;
                    System.err.println(String.format("catalog_col=%s, other_tbl=%s, other_col=%s",
                                                     catalog_col.fullName(), other_tbl.fullName(), other_col.fullName()));
                    assertEquals(e.toString(), other_tbl, other_col.getParent());
                   
                    // Make sure that the table's partitioning column matches 
                    assertEquals(String.format("%s<-->%s\n%s", catalog_tbl, other_tbl, e.toString()), other_tbl.getPartitioncolumn(), other_col);
                } // FOR (Edge)
View Full Code Here


      if(!constraintMap.isEmpty()){
        String foreignKey = null;
        Constraint constraint = CollectionUtil.first(constraintMap).getConstraint();
        Column foreignKeyCol = CollectionUtil.first(constraint.getForeignkeycols()).getColumn();
        foreignKey = foreignKeyCol.fullName();       
        if(foreignKey!=null){
          Map<String, String> foreignKeyValueMap = new HashMap<String, String>();
          foreignKeyValueMap.put(foreignKey, value);
          ArrayList<Long> timestamps;
          if(finalResult.containsKey(foreignKeyValueMap)){
View Full Code Here

                            if (catalog_col != null && catalog_param != null) {
                                // If this table is a view, then we need to check whether
                                // we have to point the column down to the origin column
                                if (catalog_col.getMatviewsource() != null) {
                                    if (debug.val)
                                        LOG.debug("Found View Column: " + catalog_col.fullName() + " -> " + catalog_col.getMatviewsource().fullName());
                                    catalog_col = catalog_col.getMatviewsource();
                                }
                                if (trace.val)
                                    LOG.trace(String.format("[%s] Adding cache entry for %s: %s -> %s",
                                                            CatalogUtil.getDisplayName(catalog_tbl),
View Full Code Here

                            // If this is the case, then we can substitute that mofo in it's place
                            if (stmt_cache.predicates.containsKey(catalog_col)) {
                                for (Pair<ExpressionType, CatalogType> pair : stmt_cache.predicates.get(catalog_col)) {
                                    if (trace.val)
                                        LOG.trace(String.format("Linking %s to predicate %s because of %s",
                                                  other_col.fullName(), pair, catalog_col.fullName()));
                                   
                                    ExpressionType expType = pair.getFirst();
                                    CatalogType param = pair.getSecond();
                                    stmt_cache.put(other_col, param, expType, (Table)other_col.getParent());
                                    frag_cache.put(other_col, param, expType, (Table)other_col.getParent());
View Full Code Here

            LOG.debug("Calculating partition for VoltTableRow from " + catalog_tbl);

        int partition = -1;
        Column catalog_col = this.cache_tablePartitionColumns.get(catalog_tbl);
        assert (catalog_col != null) : "Null partition column: " + catalog_tbl;
        assert ((catalog_col instanceof VerticalPartitionColumn) == false) : "Invalid partitioning column: " + catalog_col.fullName();

        // Multi-Column Partitioning
        if (catalog_col instanceof MultiColumn) {
            MultiColumn mc = (MultiColumn) catalog_col;
            if (debug.val)
View Full Code Here

                    Column partition_col = catalog_tbl.getPartitioncolumn();
                    if (partition_col instanceof MultiColumn) {
                        if (debug.val)
                            LOG.warn(String.format("%s references %s, which is partitioned on %s. " +
                                 "Cannot be used for fast look-ups",
                                 catalog_frag.fullName(), catalog_tbl.getName(), partition_col.fullName()));
                        return (null);
                    }
                    else if (partition_col != null && cache_entry.predicates.containsKey(partition_col)) {
                        for (Pair<ExpressionType, CatalogType> pair : cache_entry.predicates.get(partition_col)) {
                            if (pair.getFirst() == ExpressionType.COMPARE_EQUAL &&
View Full Code Here

                LOG.trace("Estimating table size for " + catalog_tbl);
            long table_bytes = this.estimate(catalog_tbl, partitions);
            if (debug.val) {
                Column catalog_col = (catalog_tbl.getIsreplicated() ? ReplicatedColumn.get(catalog_tbl) : catalog_tbl.getPartitioncolumn());
                assert (catalog_col != null) : catalog_tbl;
                m0.put(catalog_col.fullName(), table_bytes);
            }
            bytes += table_bytes;

            // INDEXES (unsupported)
            for (Index catalog_idx : catalog_tbl.getIndexes()) {
View Full Code Here

            estimate += table_stats.tuple_size_total / partitions;
            if (trace.val)
                catalog_col = catalog_tbl.getPartitioncolumn();
        }
        if (trace.val)
            LOG.debug(String.format("%-30s%d [total=%d]", catalog_col.fullName() + ":", estimate, table_stats.tuple_size_total));
        return (estimate);
    }

    /**
     * Returns the estimate size of a tuple in bytes
View Full Code Here

            // NON-REPLICATED TABLE
            else {
                // We need to calculate the partition value based on this table's partitioning column
                Column catalog_col = cache_tablePartitionColumns.get(catalog_tbl);
                if (trace.val)
                    LOG.trace("Partitioning Column: " + (catalog_col != null ? catalog_col.fullName() : catalog_col));

                // MULTI-COLUMN PARTITIONING
                // Strap on your seatbelts, we're going in!!!
                if (catalog_col instanceof MultiColumn) {
                    // HACK: All multi-column look-ups on queries with an OR
View Full Code Here

                if (catalog_col instanceof MultiColumn) {
                    // HACK: All multi-column look-ups on queries with an OR
                    // must be broadcast
                    if (target.isMarkedContainsOR()) {
                        if (debug.val)
                            LOG.warn("Trying to use multi-column partitioning [" + catalog_col.fullName() + "] on query that contains an 'OR': " + target);
                        table_partitions.addAll(this.all_partitions);
                    } else {
                        MultiColumn mc = (MultiColumn) catalog_col;
                        PartitionSet mc_partitions[] = this.mcPartitionSetPool.borrowObject();
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.