@Evolving public interface PredicateEvaluator
Predicate
on input batch and return a selection
vector containing one value for each row in input batch indicating whether the row has passed
the predicate or not.
Optionally it takes an existing selection vector along with the input batch for evaluation.
Result selection vector is combined with the given existing selection vector and a new selection
vector is returned. This mechanism allows running an input batch through several predicate
evaluations without rewriting the input batch to remove rows that do not pass the predicate
after each predicate evaluation. The new selection should be same or more selective as the
existing selection vector. For example if a row is marked as unselected in existing selection
vector, then it should remain unselected in the returned selection vector even when the given
predicate returns true for the row.Modifier and Type | Method and Description |
---|---|
ColumnVector |
eval(ColumnarBatch inputData,
java.util.Optional<ColumnVector> existingSelectionVector)
Evaluate the predicate on given inputData.
|
ColumnVector eval(ColumnarBatch inputData, java.util.Optional<ColumnVector> existingSelectionVector)
inputData
- ColumnarBatch
of data to which the predicate
expression refers for input.existingSelectionVector
- Optional existing selection vector. If not empty, it is
combined with the predicate result. The caller is also
releasing the ownership of `existingSelectionVector` to this
callee, and the callee is responsible for closing it.ColumnVector
of boolean type that captures the predicate result for each
row together with the existing selection vector.