org.teiid.query.processor.relational
Class SortUtility

java.lang.Object
  extended by org.teiid.query.processor.relational.SortUtility

public class SortUtility
extends java.lang.Object

Implements several modes of a multi-pass sort.


Nested Class Summary
static class SortUtility.Mode
           
 
Constructor Summary
SortUtility(TupleSource sourceID, java.util.List<OrderByItem> items, SortUtility.Mode mode, BufferManager bufferMgr, java.lang.String groupName, java.util.List schema)
           
SortUtility(TupleSource ts, java.util.List expressions, java.util.List<java.lang.Boolean> types, SortUtility.Mode mode, BufferManager bufferManager, java.lang.String connectionID, java.util.List schema)
           
 
Method Summary
protected  void initialSort()
          creates sorted sublists stored in tuplebuffers
 boolean isDistinct()
           
 boolean isDone()
           
protected  void mergePhase()
           
 java.util.List<TupleBuffer> onePassSort()
           
 TupleBuffer sort()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortUtility

public SortUtility(TupleSource sourceID,
                   java.util.List<OrderByItem> items,
                   SortUtility.Mode mode,
                   BufferManager bufferMgr,
                   java.lang.String groupName,
                   java.util.List schema)

SortUtility

public SortUtility(TupleSource ts,
                   java.util.List expressions,
                   java.util.List<java.lang.Boolean> types,
                   SortUtility.Mode mode,
                   BufferManager bufferManager,
                   java.lang.String connectionID,
                   java.util.List schema)
Method Detail

isDone

public boolean isDone()

sort

public TupleBuffer sort()
                 throws TeiidComponentException,
                        TeiidProcessingException
Throws:
TeiidComponentException
TeiidProcessingException

onePassSort

public java.util.List<TupleBuffer> onePassSort()
                                        throws TeiidComponentException,
                                               TeiidProcessingException
Throws:
TeiidComponentException
TeiidProcessingException

initialSort

protected void initialSort()
                    throws TeiidComponentException,
                           TeiidProcessingException
creates sorted sublists stored in tuplebuffers

Throws:
TeiidComponentException
TeiidProcessingException

mergePhase

protected void mergePhase()
                   throws TeiidComponentException,
                          TeiidProcessingException
Throws:
TeiidComponentException
TeiidProcessingException

isDistinct

public boolean isDistinct()


Copyright © 2011. All Rights Reserved.