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
  • Field Details

    • FALSE_FILTER_INSTANCE

      static final ChunkFilter FALSE_FILTER_INSTANCE
      A filter that always returns false.
    • TRUE_FILTER_INSTANCE

      static final ChunkFilter TRUE_FILTER_INSTANCE
      A filter that always returns true.
    • FILTER_CHUNK_SIZE

      static final int FILTER_CHUNK_SIZE
      How 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_SIZE
      How many values we wait for before checking for interruption and throwing a cancellation exception
    • INTERRUPTION_GOAL_MILLIS

      static final long INTERRUPTION_GOAL_MILLIS
      How 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 filter
      results - 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 filter
      columnSource - the column source to filter
      usePrev - 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