Examples of SortController


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

   * @return  the sort controller
    */
  private ScanController loadSorter()
    throws StandardException
  {
    SortController       sorter;
    long           sortId;
    ExecRow         sourceRow;
    ExecRow          inputRow;
    boolean          inOrder = (order.length == 0 || isInSortedOrder);
    int            inputRowCountEstimate = (int) optimizerEstimatedRowCount;

    // find the language context and
        // Get the current transaction controller
    TransactionController tc = getTransactionController();
    sortId = tc.createSort((Properties)null,
            sortTemplateRow.getRowArray(),
            order,
            observer,
            inOrder,
            inputRowCountEstimate, // est rows
             maxRowSize      // est rowsize
            );
    sorter = tc.openSort(sortId);
    genericSortId = sortId;
    dropGenericSort = true;
 
    /* The sorter is responsible for doing the cloning */
    while ((inputRow = getNextRowFromRS()) != null)
    {
      /* The sorter is responsible for doing the cloning */
      sorter.insert(inputRow.getRowArray());
    }
    source.close();
    sortProperties = sorter.getSortInfo().getAllSortInfo(sortProperties);
    sorter.completedInserts();

    return tc.openSortScan(sortId, activation.getResultSetHoldability());
  }
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.