Examples of BackingStoreHashtable


Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

        // select entire data set into a hash table, with first column key
    int[] keyColumns = new int[1];
    keyColumns[0] = 0;

        BackingStoreHashtable result_set =
            tc.createBackingStoreHashtableFromScan(
                conglomid,
                0,
                TransactionController.MODE_TABLE,
                TransactionController.ISOLATION_SERIALIZABLE,
                (FormatableBitSet) null,
                start_key, start_op,
                qualifier,
                stop_key, stop_op,
                -1,             // no limit on total rows.
                keyColumns,     // first column is hash key column
                false,          // don't remove duplicates
                -1,             // no estimate of rows
                -1,             // put it all into memory
                -1,             // use default initial capacity
                -1,             // use default load factor
                false,          // don't maintain runtime statistics
                false,          // don't skip null key columns
                false);         // don't keep after commit

        // make sure the expected result set is the same as the actual result
        // set.

        Enumeration e = result_set.elements();

        while (e.hasMoreElements())
        {
            Object   obj;
            DataValueDescriptor[] row = null;

            if ((obj = e.nextElement()) instanceof DataValueDescriptor[] )
            {
                row = (DataValueDescriptor[] ) obj;
                key = ((SQLLongint)(row[2])).getLong();

                if (!set.remove(new Long(key)))
                {
                    return(
                        fail("(t_scanFetchHashtable-obj) wrong key, expected (" +
                              input_expect_key + ")" +
                              "but got (" + key + ")."));
                }
                numrows++;
            }
            else if (obj instanceof List)
            {
                List row_vect = (List) obj;

                for (int i = 0; i < row_vect.size(); i++)
                {
                    row = (DataValueDescriptor[]) row_vect.get(i);

                    key = ((SQLLongint)(row[2])).getLong();

                    if (!set.remove(new Long(key)))
                    {
                        return(fail(
                            "(t_scanFetchHashtable-vector) wrong key, expected (" +
                             input_expect_key + ")" +
                             "but got (" + key + ")."));
                    }
                    numrows++;
                }
            }
            else
            {
                return(fail(
                    "(t_scanFetchHashtable) got bad type for data: " + obj));
            }
        }

        if (numrows != expect_numrows)
        {
            return(
                fail(
                    "(t_scanFetchHashtable) wrong number of rows. Expected " +
                     expect_numrows + " rows, but got " + numrows + "rows."));
        }

        result_set.close();

        // select entire data set into a hash table, with key being
        // the third column, which is the unique id used to verify the
        // right result set is being returned.:

        // open a new scan
    keyColumns[0] = 2;

        result_set =
            tc.createBackingStoreHashtableFromScan(
                conglomid,
                0,
                TransactionController.MODE_TABLE,
                TransactionController.ISOLATION_SERIALIZABLE,
                (FormatableBitSet) null,
                start_key, start_op,
                qualifier,
                stop_key, stop_op,
                -1,             // no limit on total rows.
                keyColumns,              // third column is hash key column
                false,          // don't remove duplicates
                -1,             // no estimate of rows
                -1,             // put it all into memory
                -1,             // use default initial capacity
                -1,             // use default load factor
                false,         // don't maintain runtime statistics
        false,      // don't skip null key columns
                false);         // don't keep after commit

        Object removed_obj;
        for (numrows = 0; numrows < expect_numrows; numrows++)
        {
      long exp_key ;
      if (order == ORDER_DESC)
        exp_key = input_expect_key - numrows;
      else
        exp_key = input_expect_key + numrows;
            if ((removed_obj =
                    result_set.remove(
                        new SQLLongint(exp_key))) == null)
            {
                fail("(t_scanFetchHashtable-2-vector) wrong key, expected (" +
                      (exp_key) + ")" +
                      "but did not find it.");
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

       * ourself in as the row source.  This allows us
       * to apply the single table predicates to the
       * rows coming from our child as we build the
       * hash table.
       */
      ht = new BackingStoreHashtable(tc,
                       this,
                       keyColumns,
                       removeDuplicates,
                       (int) optimizerEstimatedRowCount,
                       maxInMemoryRowCount,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

            initCapacity = (int) rowCount;
        }
        if (maxCapacity < initCapacity)
          initCapacity = maxCapacity;

                tableScan.past2FutureTbl = new BackingStoreHashtable(
                        tc, null, new int[]{0}, false, -1,
                        maxCapacity, initCapacity, -1, false,
                        tableScan.getActivation().getResultSetHoldability());
      }
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

       * ourself in as the row source.  This allows us
       * to apply the single table predicates to the
       * rows coming from our child as we build the
       * hash table.
       */
      ht = new BackingStoreHashtable(tc,
                       this,
                       keyColumns,
                       removeDuplicates,
                       (int) optimizerEstimatedRowCount,
                       maxInMemoryRowCount,
View Full Code Here

Examples of org.apache.derby.iapi.store.access.BackingStoreHashtable

     * is within certain bounds.  We have no alternative for scrolling insensitive
     * cursors so we'll just trust that it will fit.
     * We need BackingStoreHashtable to actually go to disk when it doesn't fit.
     * This is a known limitation.
     */
    ht = new BackingStoreHashtable(getTransactionController(),
                     null,
                     keyCols,
                     false,
                    -1, // don't trust optimizer row count
                     HashScanResultSet.DEFAULT_MAX_CAPACITY,
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.