public class DistinctSequence extends DelegatingSequence
NodeSequence
that wraps another NodeSequence
and returns only those rows that are seen for the first time.NodeSequence.AlternateSizeBatch, NodeSequence.Batch, NodeSequence.LimitBatch, NodeSequence.MultiWidthBatch, NodeSequence.Restartable, NodeSequence.RowAccessor, NodeSequence.RowFilter, NodeSequence.SingleWidthBatch
Modifier and Type | Field and Description |
---|---|
protected RowExtractors.ExtractFromRow |
keyExtractor |
protected static Logger |
LOGGER |
protected boolean |
trace |
delegate
NO_PASS_ROW_FILTER, PASS_ROW_FILTER
Constructor and Description |
---|
DistinctSequence(NodeSequence delegate,
TypeSystem types,
BufferManager bufferMgr,
boolean useHeap)
Create a new distinct sequence given the type system and buffer manager.
|
Modifier and Type | Method and Description |
---|---|
NodeSequence.Batch |
nextBatch()
Get the next batch of
NodeKey instances. |
String |
toString() |
close, getRowCount, isEmpty, width
append, batchFilteredWith, batchOf, batchOf, batchOf, batchOfKeys, batchOfKeys, batchOfKeys, batchOfKeys, batchWithCount, copy, emptyBatch, emptySequence, filter, keyFor, limit, limit, merging, requireBoth, requireEither, skip, slice, slicingBatch, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes
protected static final Logger LOGGER
protected final RowExtractors.ExtractFromRow keyExtractor
protected final boolean trace
public DistinctSequence(NodeSequence delegate, TypeSystem types, BufferManager bufferMgr, boolean useHeap)
delegate
- the node sequence that is to be wrapped; may not be nulltypes
- the system of type factories; may not be nullbufferMgr
- the buffer manager that should be used to create a temporary buffer into which records of the rows can be
kept; may not be nulluseHeap
- true if the temporary buffer should use the heap, or false if it should store data off-heappublic NodeSequence.Batch nextBatch()
NodeSequence
NodeKey
instances.nextBatch
in class DelegatingSequence
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.