Package io.trino.spi.predicate
Class EquatableValueSet
java.lang.Object
io.trino.spi.predicate.EquatableValueSet
- All Implemented Interfaces:
ValueSet
A set containing values that are uniquely identifiable.
Assumes an infinite number of possible values. The values may be collectively included
or collectively excluded.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEquatableValueSet(Type type, boolean inclusive, Set<EquatableValueSet.ValueEntry> entries) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontainsValue(Object value) booleanlonggetType()intinthashCode()booleanbooleanisAll()booleanbooleanisNone()booleanbooleantoString()toString(ConnectorSession session) toString(ConnectorSession session, int limit) tryExpandRanges(int valuesLimit) Try to expandvalueSetinto a discrete set of (at mostlimit) objects.
-
Constructor Details
-
EquatableValueSet
-
-
Method Details
-
getType
-
inclusive
public boolean inclusive() -
getEntries
-
getValues
-
getValuesCount
public int getValuesCount() -
isNone
public boolean isNone() -
isAll
public boolean isAll() -
isSingleValue
public boolean isSingleValue()- Specified by:
isSingleValuein interfaceValueSet
-
getSingleValue
- Specified by:
getSingleValuein interfaceValueSet
-
isDiscreteSet
public boolean isDiscreteSet()- Specified by:
isDiscreteSetin interfaceValueSet
-
getDiscreteSet
- Specified by:
getDiscreteSetin interfaceValueSet
-
containsValue
- Specified by:
containsValuein interfaceValueSet
-
getDiscreteValues
- Specified by:
getDiscreteValuesin interfaceValueSet- Returns:
- value predicates for equatable Types (but not orderable)
-
getValuesProcessor
- Specified by:
getValuesProcessorin interfaceValueSet
-
intersect
-
overlaps
-
union
-
contains
-
complement
- Specified by:
complementin interfaceValueSet
-
toString
-
toString
-
toString
-
tryExpandRanges
Description copied from interface:ValueSetTry 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.- Specified by:
tryExpandRangesin interfaceValueSet
-
getRetainedSizeInBytes
public long getRetainedSizeInBytes()- Specified by:
getRetainedSizeInBytesin interfaceValueSet
-
hashCode
public int hashCode() -
equals
-