Interface VectorValueMatcher
-
- All Superinterfaces:
VectorSizeInspector
- All Known Implementing Classes:
BaseVectorValueMatcher
,BooleanVectorValueMatcher
public interface VectorValueMatcher extends VectorSizeInspector
An object that returns a boolean indicating if the "current" row should be selected or not. The most prominent use of this interface is that it is returned by theFilter
"makeVectorMatcher" method, where it is used to identify selected rows for filtered cursors and filtered aggregators.
-
-
Method Summary
-
Methods inherited from interface org.apache.druid.segment.vector.VectorSizeInspector
getCurrentVectorSize, getMaxVectorSize
-
-
-
-
Method Detail
-
match
ReadableVectorMatch match(ReadableVectorMatch mask, boolean includeUnknown)
Examine the current vector and return a match indicating what is accepted.Does not modify "mask".
- Parameters:
mask
- must not be null; useVectorMatch.allTrue(int)
if you don't need a mask.includeUnknown
- mapping for Druid native two state logic system into SQL three-state logic system. If set to true, this method should also return true if the result is 'unknown' to be a match, such as from the input being null valued. Used primarily to allowNotFilter
to invert a match in an SQL compliant manner- Returns:
- the subset of "mask" that this value matcher accepts. May be the same instance as {@param mask} if every row in the mask matches the filter.
-
nullMatcher
static VectorValueMatcher nullMatcher(VectorValueSelector selector)
Make aVectorValueMatcher
that only selects input rows with null values- Parameters:
selector
-- Returns:
-
allFalseSingleValueDimensionMatcher
static VectorValueMatcher allFalseSingleValueDimensionMatcher(SingleValueDimensionVectorSelector selector)
Make an always falseVectorValueMatcher
for aSingleValueDimensionVectorSelector
. WhenincludeUnknown
is specified to thematch(ReadableVectorMatch, boolean)
function, this matcher will add all rows ofSingleValueDimensionVectorSelector.getRowVector()
which are null to theReadableVectorMatch
as selections, to participate in Druid 2-state logic system to SQL 3-state logic system conversion.
-
allFalseMultiValueDimensionMatcher
static VectorValueMatcher allFalseMultiValueDimensionMatcher(MultiValueDimensionVectorSelector selector)
Make an always falseVectorValueMatcher
for aMultiValueDimensionVectorSelector
. WhenincludeUnknown
is specified to thematch(ReadableVectorMatch, boolean)
function, this matcher will add all rows ofMultiValueDimensionVectorSelector.getRowVector()
which are empty or have any null elements to theReadableVectorMatch
as selections, to participate in Druid 2-state logic system to SQL 3-state logic system conversion (as best as a multi-value dimension can).
-
allFalseValueMatcher
static BaseVectorValueMatcher allFalseValueMatcher(VectorValueSelector selector)
Make an always falseVectorValueMatcher
for aVectorValueSelector
. WhenincludeUnknown
is specified to thematch(ReadableVectorMatch, boolean)
function, this matcher will add the rows indicated as null values ofVectorValueSelector.getNullVector()
to theReadableVectorMatch
as selections, to participate in Druid 2-state logic system to SQL 3-state logic system conversion.
-
allFalseObjectMatcher
static VectorValueMatcher allFalseObjectMatcher(VectorObjectSelector selector)
Make an always falseVectorValueMatcher
for aVectorObjectSelector
. WhenincludeUnknown
is specified to thematch(ReadableVectorMatch, boolean)
function, this matcher will add all rows ofVectorObjectSelector.getObjectVector()
which are null to theReadableVectorMatch
as selections, to participate in Druid 2-state logic system to SQL 3-state logic system conversion.
-
matchNulls
static ReadableVectorMatch matchNulls(ReadableVectorMatch mask, VectorMatch match, @Nullable boolean[] nullVector)
-
-