Class SortedRangeSet
java.lang.Object
io.trino.spi.predicate.SortedRangeSet
- All Implemented Interfaces:
ValueSet
A set containing zero or more Ranges of the same type over a continuous space of possible values.
Ranges are coalesced into the most compact representation of non-overlapping Ranges. This structure
allows iteration across these compacted Ranges in increasing order, as well as other common
set-related operation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic SortedRangeSet.BuilderbooleanbooleancontainsValue(Object value) static SortedRangeSetProvided Ranges are unioned together to form the SortedRangeSetbooleanstatic SortedRangeSetfromJson(Type type, boolean[] inclusive, Block sortedRanges, SortedRangeSet.DiscreteSetMarker discreteSetMarker) Deprecated.boolean[]intlonggetSpan()getType()inthashCode()booleanisAll()booleanbooleanisNone()booleanbooleantoString()toString(ConnectorSession session) toString(ConnectorSession session, int limit) tryExpandRanges(int valuesLimit) Try to expandvalueSetinto a discrete set of (at mostlimit) objects.union(Collection<ValueSet> valueSets) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.trino.spi.predicate.ValueSet
getDiscreteValues, subtract
-
Method Details
-
fromJson
@Deprecated public static SortedRangeSet fromJson(Type type, boolean[] inclusive, Block sortedRanges, SortedRangeSet.DiscreteSetMarker discreteSetMarker) Deprecated. -
copyOf
Provided Ranges are unioned together to form the SortedRangeSet -
getType
-
getInclusive
public boolean[] getInclusive() -
getSortedRanges
-
getOrderedRanges
-
getRangeCount
public int getRangeCount() -
isNone
-
isAll
-
isSingleValue
public boolean isSingleValue()- Specified by:
isSingleValuein interfaceValueSet
-
getSingleValue
- Specified by:
getSingleValuein interfaceValueSet
-
getDiscreteSetMarker
-
isDiscreteSet
public boolean isDiscreteSet()- Specified by:
isDiscreteSetin interfaceValueSet
-
getDiscreteSet
- Specified by:
getDiscreteSetin interfaceValueSet
-
containsValue
- Specified by:
containsValuein interfaceValueSet
-
getSpan
-
getRanges
-
getValuesProcessor
- Specified by:
getValuesProcessorin interfaceValueSet
-
intersect
-
overlaps
-
union
-
union
-
contains
-
complement
- Specified by:
complementin interfaceValueSet
-
hashCode
-
equals
-
toString
-
toString
-
toString
-
getRetainedSizeInBytes
public long getRetainedSizeInBytes()- Specified by:
getRetainedSizeInBytesin interfaceValueSet
-
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
-
builder
-