Package io.trino.spi.predicate
Interface ValueSet
- All Known Implementing Classes:
AllOrNoneValueSet,EquatableValueSet,SortedRangeSet
public interface ValueSet
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValueSetdefault booleanbooleancontainsValue(Object value) static ValueSetcopyOf(Type type, Collection<?> values) static ValueSetcopyOfRanges(Type type, Collection<Range> ranges) default DiscreteValuesdefault RangeslonggetType()booleanisAll()booleanbooleanisNone()booleanstatic ValueSetstatic ValueSetstatic ValueSetstatic ValueSetdefault booleandefault ValueSettoString()toString(ConnectorSession session) toString(ConnectorSession session, int limit) tryExpandRanges(int valuesLimit) Try to expandvalueSetinto a discrete set of (at mostlimit) objects.default ValueSetunion(Collection<ValueSet> valueSets)
-
Method Details
-
none
-
all
-
of
-
copyOf
-
ofRanges
-
ofRanges
-
copyOfRanges
-
getType
Type getType() -
isNone
boolean isNone() -
isAll
boolean isAll() -
isSingleValue
boolean isSingleValue() -
getSingleValue
Object getSingleValue() -
isDiscreteSet
boolean isDiscreteSet() -
getDiscreteSet
-
containsValue
-
getDiscreteValues
- Returns:
- value predicates for equatable Types (but not orderable)
-
getRanges
- Returns:
- range predicates for orderable Types
-
getValuesProcessor
ValuesProcessor getValuesProcessor() -
intersect
-
union
-
union
-
complement
ValueSet complement() -
overlaps
-
subtract
-
contains
-
toString
String toString() -
toString
-
toString
-
getRetainedSizeInBytes
long getRetainedSizeInBytes() -
tryExpandRanges
Try to expandvalueSetinto a discrete set of (at mostlimit) objects. For example: [1, 5] can be expanded into {1, 2, 3, 4, 5}. If the data type is not supported or the expansion results in too many values,Optional.empty()is returned.
-