Interface ChunkFilter
- All Known Subinterfaces:
ChunkFilter.ByteChunkFilter
,ChunkFilter.CharChunkFilter
,ChunkFilter.DoubleChunkFilter
,ChunkFilter.FloatChunkFilter
,ChunkFilter.IntChunkFilter
,ChunkFilter.LongChunkFilter
,ChunkFilter.ObjectChunkFilter<T>
,ChunkFilter.ShortChunkFilter
public interface ChunkFilter
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChunkFilter
A filter that always returns false.static final int
How many values we read from a column source into a chunk before applying a filter.static final long
How many values we wait for before checking for interruption and throwing a cancellation exceptionstatic final long
How long we would like to take, in milliseconds between interruption checksstatic final ChunkFilter
A filter that always returns true. -
Method Summary
Modifier and TypeMethodDescriptionstatic WritableRowSet
applyChunkFilter
(RowSet selection, ColumnSource<?> columnSource, boolean usePrev, ChunkFilter chunkFilter) Apply a chunk filter to a RowSet and column source, producing a new WritableRowSet that is responsive to the filter.void
filter
(Chunk<? extends Values> values, LongChunk<OrderedRowKeys> keys, WritableLongChunk<OrderedRowKeys> results) Filter a chunk of values, setting parallel values in results to "true" or "false".
-
Field Details
-
FALSE_FILTER_INSTANCE
A filter that always returns false. -
TRUE_FILTER_INSTANCE
A filter that always returns true. -
FILTER_CHUNK_SIZE
static final int FILTER_CHUNK_SIZEHow many values we read from a column source into a chunk before applying a filter.- See Also:
-
INITIAL_INTERRUPTION_SIZE
static final long INITIAL_INTERRUPTION_SIZEHow many values we wait for before checking for interruption and throwing a cancellation exception -
INTERRUPTION_GOAL_MILLIS
static final long INTERRUPTION_GOAL_MILLISHow long we would like to take, in milliseconds between interruption checks
-
-
Method Details
-
filter
void filter(Chunk<? extends Values> values, LongChunk<OrderedRowKeys> keys, WritableLongChunk<OrderedRowKeys> results) Filter a chunk of values, setting parallel values in results to "true" or "false". The results chunk must have capacity at least as large as values.size(); and the result size will be set to values.size() on return.- Parameters:
values
- the values to filterresults
- a boolean chunk with true values for items that match the filter, and false otherwise
-
applyChunkFilter
static WritableRowSet applyChunkFilter(RowSet selection, ColumnSource<?> columnSource, boolean usePrev, ChunkFilter chunkFilter) Apply a chunk filter to a RowSet and column source, producing a new WritableRowSet that is responsive to the filter.- Parameters:
selection
- the RowSet to filtercolumnSource
- the column source to filterusePrev
- should we use previous values from the column source?chunkFilter
- the chunk filter to apply- Returns:
- A new WritableRowSet representing the filtered values, owned by the caller
-