Interface ColumnarFilter

All Known Implementing Classes:
DictionaryAwareColumnarFilter, IsNotNullColumnarFilter, IsNullColumnarFilter

public interface ColumnarFilter
Implementations of this interface evaluate a filter on the input Page.

FilterEvaluator will call one of filterPositionsRange or filterPositionsList depending on whether the active SelectionPositions are stored in a list or in a range.

Implementations are expected to operate on a Page containing only the required channels specified by getInputChannels.

Currently, the implementations of this interface except IS_NULL and NOT(IS_NULL), don't explicitly handle NULLs or indeterminate values, and just return FALSE for those cases. This will need to change to allow ColumnarFilter implementations to be composed in all cases (e.g. NOT filters). ColumnarFilter implementations are never composed, FilterEvaluator implementations may be composed.

  • Method Details

    • filterPositionsRange

      int filterPositionsRange(ConnectorSession session, int[] outputPositions, int offset, int size, Page loadedPage)
      Parameters:
      outputPositions - list of positions active after evaluating this filter on the input loadedPage
      offset - start of input positions range evaluated by this filter
      size - length of input positions range evaluated by this filter
      loadedPage - input Page after using getInputChannels() to load only the required channels
      Returns:
      count of positions active after evaluating this filter on the input loadedPage
    • filterPositionsList

      int filterPositionsList(ConnectorSession session, int[] outputPositions, int[] activePositions, int offset, int size, Page loadedPage)
      Parameters:
      outputPositions - list of positions active after evaluating this filter on the input loadedPage
      activePositions - input positions list evaluated by this filter
      offset - index in activePositions where the input positions evaluated by this filter start
      size - length after offset in activePositions where the input positions evaluated by this filter end
      loadedPage - input Page after using getInputChannels() to load only the required channels
      Returns:
      count of positions active after evaluating this filter on the input loadedPage
    • getInputChannels

      InputChannels getInputChannels()
      Returns:
      InputChannels of input Page that this filter operates on