Class ValueMatchers

    • Method Detail

      • allTrue

        public static ValueMatcher allTrue()
        Matcher for constant 'true' condition, where all rows should always match
      • allFalse

        public static ValueMatcher allFalse()
        Matcher for constant 'false' condition, where rows will never be matched
      • allUnknown

        public static ValueMatcher allUnknown()
        Matcher for constant 'unknown' condition, such as a column of all null values, where rows will never match unless includeUnknown is set to true on the match function.
      • makeStringValueMatcher

        public static ValueMatcher makeStringValueMatcher​(DimensionSelector selector,
                                                          String value,
                                                          boolean hasMultipleValues)
        Creates a constant-based ValueMatcher for a string-typed selector.
        Parameters:
        selector - column selector
        value - value to match
        hasMultipleValues - whether the column selector *might* have multiple values
      • makeStringValueMatcher

        public static ValueMatcher makeStringValueMatcher​(DimensionSelector selector,
                                                          DruidPredicateFactory predicateFactory,
                                                          boolean hasMultipleValues)
        Creates a predicate-based ValueMatcher for a string-typed selector.
        Parameters:
        selector - column selector
        predicateFactory - predicate to match
        hasMultipleValues - whether the column selector *might* have multiple values
      • makeAlwaysFalseWithNullUnknownDimensionMatcher

        public static ValueMatcher makeAlwaysFalseWithNullUnknownDimensionMatcher​(DimensionSelector selector,
                                                                                  boolean multiValue)
        Create a matcher that should always return false, except when includeUnknown is set, in which case only null values will be matched. This is typically used when the filter should never match any actual values, but still needs to be able to report 'unknown' matches.
      • makeAlwaysFalseWithNullUnknownNumericMatcher

        public static ValueMatcher makeAlwaysFalseWithNullUnknownNumericMatcher​(BaseNullableColumnValueSelector selector)
        Create a matcher that should always return false, except when includeUnknown is set, in which case only null values will be matched. This is typically used when the filter should never match any actual values, but still needs to be able to report 'unknown' matches.
      • makeAlwaysFalseWithNullUnknownObjectMatcher

        public static ValueMatcher makeAlwaysFalseWithNullUnknownObjectMatcher​(BaseObjectColumnValueSelector<?> selector)
        Create a matcher that should always return false, except when includeUnknown is set, in which case only null values will be matched. This is typically used when the filter should never match any actual values, but still needs to be able to report 'unknown' matches.