Package org.apache.druid.query.filter
Class FallbackPredicate<T>
- java.lang.Object
-
- org.apache.druid.query.filter.FallbackPredicate<T>
-
- All Implemented Interfaces:
DruidObjectPredicate<T>
public class FallbackPredicate<T> extends Object implements DruidObjectPredicate<T>
Predicatethat wraps another predicate and can catchClassCastExceptionfrom someComparatorand degrades into casting input to an expectedExpressionTypeonce an exception is encountered. Useful when processing data that might be mixed types, despite what the column capabilities might claim the type is, such as variant 'auto' types. This class is not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description FallbackPredicate(DruidObjectPredicate<T> delegate, ExpressionType expectedType)
-
-
-
Constructor Detail
-
FallbackPredicate
public FallbackPredicate(DruidObjectPredicate<T> delegate, ExpressionType expectedType)
-
-
Method Detail
-
apply
public DruidPredicateMatch apply(@Nullable T input)
- Specified by:
applyin interfaceDruidObjectPredicate<T>
-
-