Class AllOrNoneValueSet
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.domain.predicate.AllOrNoneValueSet
-
- All Implemented Interfaces:
ValueSet,AutoCloseable
public class AllOrNoneValueSet extends Object implements ValueSet
Describes a constraint as a ValueSet which can have one of several states: 1. No value can match 2. Only NULL values can match 3. Only non-null values can match 4. All values can match- See Also:
ValueSet
-
-
Constructor Summary
Constructors Constructor Description AllOrNoneValueSet(org.apache.arrow.vector.types.pojo.ArrowType type, boolean all, boolean nullAllowed)Constructs a new AllOrNoneValueSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ValueSetcomplement(BlockAllocator allocator)booleancontainsValue(Marker value)Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.booleancontainsValue(Object value)Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.booleanequals(Object obj)ObjectgetSingleValue()Attempts to return the single value contained in this ValueSet.org.apache.arrow.vector.types.pojo.ArrowTypegetType()The Arrow Type of the field this constraint applies to.inthashCode()ValueSetintersect(BlockAllocator allocator, ValueSet other)booleanisAll()Conveys if any value can satisfy this ValueSet.booleanisNone()Conveys if no value can satisfy this ValueSet.booleanisNullAllowed()Conveys if nulls should be allowed.booleanisSingleValue()Conveys if this ValueSet contains a single value.StringtoString()ValueSetunion(BlockAllocator allocator, ValueSet other)
-
-
-
Constructor Detail
-
AllOrNoneValueSet
public AllOrNoneValueSet(org.apache.arrow.vector.types.pojo.ArrowType type, boolean all, boolean nullAllowed)Constructs a new AllOrNoneValueSet.- Parameters:
type- The Apache Arrow type of the field that this ValueSet applies to.all- True if all non-null values are in this ValueSet.nullAllowed- True is all null values are in this ValueSet.
-
-
Method Detail
-
isNullAllowed
public boolean isNullAllowed()
Conveys if nulls should be allowed.- Specified by:
isNullAllowedin interfaceValueSet- Returns:
- True if NULLs satisfy this constraint, false otherwise.
- See Also:
ValueSet
-
getType
public org.apache.arrow.vector.types.pojo.ArrowType getType()
The Arrow Type of the field this constraint applies to.
-
isNone
public boolean isNone()
Conveys if no value can satisfy this ValueSet.
-
isAll
public boolean isAll()
Conveys if any value can satisfy this ValueSet.
-
isSingleValue
public boolean isSingleValue()
Conveys if this ValueSet contains a single value.- Specified by:
isSingleValuein interfaceValueSet- Returns:
- True if this ValueSet contains only a single value.
-
getSingleValue
public Object getSingleValue()
Attempts to return the single value contained in this ValueSet.- Specified by:
getSingleValuein interfaceValueSet- Returns:
- AllOrNoneValueSet never contains a single value, hence this method always throws UnsupportedOperationException.
-
containsValue
public boolean containsValue(Marker value)
Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.- Specified by:
containsValuein interfaceValueSet- Parameters:
value- The value to test in the form of a Marker.- Returns:
- True if the value is contained in the ValueSet, False otherwise.
-
containsValue
public boolean containsValue(Object value)
Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.- Specified by:
containsValuein interfaceValueSet- Parameters:
value- The value to test in the form of a Marker.- Returns:
- True if the value is contained in the ValueSet, False otherwise.
-
intersect
public ValueSet intersect(BlockAllocator allocator, ValueSet other)
-
union
public ValueSet union(BlockAllocator allocator, ValueSet other)
-
complement
public ValueSet complement(BlockAllocator allocator)
- Specified by:
complementin interfaceValueSet- See Also:
ValueSet
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-