Examples of ExecIndexRow


Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

  private ExecIndexRow getDeferredIndexRowTemplate(ExecRow baseRow,
                          RowLocation baseRowLoc)
     throws StandardException
  {
    ExecIndexRow  template;

    template = irg.getIndexRowTemplate();

    irg.getIndexRow(baseRow, baseRowLoc, template, baseRowReadMap);
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

   */
  public void finish()
    throws StandardException
  {
    ExecRow      deferredRow;
    ExecIndexRow  deferredIndexRow = new IndexRow();

    /* Deferred processing only necessary for unique indexes */
    if (rowHolder != null)
    {
      CursorResultSet rs = rowHolder.getResultSet();
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

      {
        nextTime += getElapsedMillis(beginTime);
        return null;
      }

        ExecIndexRow nextRow = getNextRowFromRS();

      /* Drain and merge rows until we find new distinct values for the grouping columns. */
      while (nextRow != null)
      {
        /* We found a new set of values for the grouping columns. 
         * Update the current row and return this group.
         */
        if (! sameGroupingValues(currSortedRow, nextRow))
        {
          ExecIndexRow result = currSortedRow;

          /* Save a clone of the new row so that it doesn't get overwritten */
          currSortedRow = (ExecIndexRow) nextRow.getClone();
          initializeVectorAggregation(currSortedRow);

          nextTime += getElapsedMillis(beginTime);
          rowsReturned++;
          return finishAggregation(result);
        }
        else
        {
          /* Same group - initialize the new row and then merge the aggregates */
          initializeVectorAggregation(nextRow);
          mergeVectorAggregates(nextRow, currSortedRow);
        }

        // Get the next row
        nextRow = getNextRowFromRS();
      }

      // We've drained the source, so no more rows to return
      ExecIndexRow result = currSortedRow;
      currSortedRow = null;
      nextTime += getElapsedMillis(beginTime);
      return finishAggregation(result);
    }
    else
    {
        ExecIndexRow sortResult = null;

          if ((sortResult = getNextRowFromRS()) != null)
      {
        setCurrentRow(sortResult);
      }
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

   */ 
  private ExecIndexRow getRowFromResultSet()
    throws StandardException
  {
    ExecRow          sourceRow;
    ExecIndexRow      inputRow = null

    if ((sourceRow = source.getNextRowCore()) != null)
    {
      rowsInput++;
      sourceExecIndexRow.execRowToExecIndexRow(sourceRow);
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

   * sets currentRow.
   */
  private ExecIndexRow getRowFromSorter()
    throws StandardException
  {
    ExecIndexRow      inputRow = null
   
    if (scanController.next())
    {
      // REMIND: HACKALERT we are assuming that result will
      // point to what sortResult is manipulating when
      // we complete the fetch.
      currentRow = sortResultRow;

      inputRow = getExecutionFactory().getIndexableRow(currentRow);

      scanController.fetch(inputRow.getRowArray());
    }
    return inputRow;
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

   *
   * @return the next row in the result
   */
  public ExecRow  getNextRowCore() throws StandardException
  {
      ExecIndexRow sortResult = null;
      ExecRow result = null;
      ExecIndexRow execIndexRow = null;
      ExecIndexRow aggResult = null;
    boolean  cloneArg = true;

    beginTime = getCurrentTimeMillis();
      if (isOpen)
      {
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

   * @exception StandardException Thrown on error
   */
  public ExecIndexRow getRowFromResultSet(boolean doClone)
    throws StandardException
  {
    ExecIndexRow      inputRow = null
   
    if (scanController.next())
    {
      // REMIND: HACKALERT we are assuming that result will
      // point to what sortResult is manipulating when
      // we complete the fetch.
      currentRow = doClone ?
        sortResultRow.getClone() : sortResultRow;

      inputRow = getExecutionFactory().getIndexableRow(currentRow);

      scanController.fetch(inputRow.getRowArray());
    }
    return inputRow;
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

      return "\t" +
          MessageService.getTextMessage(SQLState.LANG_NONE) +
          "\n";
    }

    ExecIndexRow  positioner = null;

    try
    {
      positioner = (ExecIndexRow) positionGetter.invoke(activation);
    }
    catch (StandardException e)
    {

      if (eiRow == null)
      {
        return "\t" + MessageService.getTextMessage(
                      SQLState.LANG_POSITION_NOT_AVAIL);
      }
      return "\t" + MessageService.getTextMessage(
              SQLState.LANG_UNEXPECTED_EXC_GETTING_POSITIONER) +
              "\n";
    }

    if (positioner == null)
    {
      return "\t" +
          MessageService.getTextMessage(SQLState.LANG_NONE) +
          "\n";
    }

    String searchOp = null;

    switch (searchOperator)
    {
      case ScanController.GE:
        searchOp = ">=";
        break;

      case ScanController.GT:
        searchOp = ">";
        break;

      default:
        if (SanityManager.DEBUG)
        {
          SanityManager.THROWASSERT("Unknown search operator " +
                        searchOperator);
        }

        // This is not internationalized because we should never
        // reach here.
        searchOp = "unknown value (" + searchOperator + ")";
        break;
    }

    output += "\t" + MessageService.getTextMessage(
                    SQLState.LANG_POSITIONER,
                    searchOp,
                    String.valueOf(positioner.nColumns()))
                    + "\n";
     
    output += "\t" + MessageService.getTextMessage(
                    SQLState.LANG_ORDERED_NULL_SEMANTICS) +
                    "\n";
    for (int position = 0; position < positioner.nColumns(); position++)
    {
      if (positioner.areNullsOrdered(position))
      {
        output = output + position + " ";
      }
    }
   
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

                    RowLocation rowLocation)
        throws StandardException       
  {
    int[] baseColumnPositions = id.baseColumnPositions();
    int i;
    ExecIndexRow indexRow = getIndexRowTemplate();

    for (i = 0; i < baseColumnPositions.length; i++)
    {
      DataTypeDescriptor dtd =
        columnList.elementAt(baseColumnPositions[i] - 1).getType();
      indexRow.setColumn(i + 1, dtd.getNull());
    }

    indexRow.setColumn(i + 1, rowLocation);
    return indexRow;
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.execute.ExecIndexRow

    /* Use UUIDStringOrderable in both start and stop positions for scan */
    UUIDStringOrderable = getIDValueAsCHAR(schemaId);

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(1);
    keyRow.setColumn(1, UUIDStringOrderable);

    return (SchemaDescriptor)
          getDescriptorViaIndex(
            SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX2_ID,
            keyRow,
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.