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 void
close()
ValueSet
complement(BlockAllocator allocator)
boolean
containsValue(Marker value)
Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.boolean
containsValue(Object value)
Used to test if the supplied value (in the form of a Marker) is contained in this ValueSet.boolean
equals(Object obj)
Object
getSingleValue()
Attempts to return the single value contained in this ValueSet.org.apache.arrow.vector.types.pojo.ArrowType
getType()
The Arrow Type of the field this constraint applies to.int
hashCode()
ValueSet
intersect(BlockAllocator allocator, ValueSet other)
boolean
isAll()
Conveys if any value can satisfy this ValueSet.boolean
isNone()
Conveys if no value can satisfy this ValueSet.boolean
isNullAllowed()
Conveys if nulls should be allowed.boolean
isSingleValue()
Conveys if this ValueSet contains a single value.String
toString()
ValueSet
union(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:
isNullAllowed
in 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:
isSingleValue
in 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:
getSingleValue
in 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:
containsValue
in 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:
containsValue
in 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:
complement
in interfaceValueSet
- See Also:
ValueSet
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-