Package io.trino.sql.gen.columnar
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 Summary
Modifier and TypeMethodDescriptionintfilterPositionsList(ConnectorSession session, int[] outputPositions, int[] activePositions, int offset, int size, Page loadedPage) intfilterPositionsRange(ConnectorSession session, int[] outputPositions, int offset, int size, Page loadedPage)
-
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 loadedPageoffset- start of input positions range evaluated by this filtersize- length of input positions range evaluated by this filterloadedPage- input Page after usinggetInputChannels()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 loadedPageactivePositions- input positions list evaluated by this filteroffset- index in activePositions where the input positions evaluated by this filter startsize- length after offset in activePositions where the input positions evaluated by this filter endloadedPage- input Page after usinggetInputChannels()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
-