Interface VectorValueMatcher
- All Superinterfaces:
VectorSizeInspector
- All Known Implementing Classes:
BaseVectorValueMatcher,BooleanVectorValueMatcher
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 the
Filter "makeVectorMatcher" method, where it is used to
identify selected rows for filtered cursors and filtered aggregators.-
Method Summary
Modifier and TypeMethodDescriptionstatic VectorValueMatcherMake an always falseVectorValueMatcherfor aMultiValueDimensionVectorSelector.static VectorValueMatcherallFalseObjectMatcher(VectorObjectSelector selector) Make an always falseVectorValueMatcherfor aVectorObjectSelector.static VectorValueMatcherMake an always falseVectorValueMatcherfor aSingleValueDimensionVectorSelector.static BaseVectorValueMatcherallFalseValueMatcher(VectorValueSelector selector) Make an always falseVectorValueMatcherfor aVectorValueSelector.match(ReadableVectorMatch mask, boolean includeUnknown) Examine the current vector and return a match indicating what is accepted.static ReadableVectorMatchmatchNulls(ReadableVectorMatch mask, VectorMatch match, boolean[] nullVector) static VectorValueMatchernullMatcher(VectorValueSelector selector) Make aVectorValueMatcherthat only selects input rows with null valuesMethods inherited from interface org.apache.druid.segment.vector.VectorSizeInspector
getCurrentVectorSize, getMaxVectorSize
-
Method Details
-
match
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, match vectors returned by this method should include true values wherever the matching result is 'unknown', such as from the input being null valued.- Returns:
- the subset of "mask" that this value matcher accepts. May be the same instance as if every row in the mask matches the filter.
-
nullMatcher
Make aVectorValueMatcherthat only selects input rows with null values- Parameters:
selector-- Returns:
-
allFalseSingleValueDimensionMatcher
static VectorValueMatcher allFalseSingleValueDimensionMatcher(SingleValueDimensionVectorSelector selector) Make an always falseVectorValueMatcherfor aSingleValueDimensionVectorSelector. WhenincludeUnknownis specified to thematch(ReadableVectorMatch, boolean)function, this matcher will add all rows ofSingleValueDimensionVectorSelector.getRowVector()which are null to theReadableVectorMatchas 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 falseVectorValueMatcherfor aMultiValueDimensionVectorSelector. WhenincludeUnknownis specified to thematch(ReadableVectorMatch, boolean)function, this matcher will add all rows ofMultiValueDimensionVectorSelector.getRowVector()which are empty or have any null elements to theReadableVectorMatchas 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
Make an always falseVectorValueMatcherfor aVectorValueSelector. WhenincludeUnknownis specified to thematch(ReadableVectorMatch, boolean)function, this matcher will add the rows indicated as null values ofVectorValueSelector.getNullVector()to theReadableVectorMatchas selections, to participate in Druid 2-state logic system to SQL 3-state logic system conversion. -
allFalseObjectMatcher
Make an always falseVectorValueMatcherfor aVectorObjectSelector. WhenincludeUnknownis specified to thematch(ReadableVectorMatch, boolean)function, this matcher will add all rows ofVectorObjectSelector.getObjectVector()which are null to theReadableVectorMatchas 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)
-