Class Marker
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.domain.predicate.Marker
-
- All Implemented Interfaces:
ValueMarker,AutoCloseable,Comparable<ValueMarker>
- Direct Known Subclasses:
MarkerFactory.SharedBlockMarker
public class Marker extends Object implements Comparable<ValueMarker>, AutoCloseable, ValueMarker
A point on the continuous space defined by the specified type. Each point may be just below, exact, or just above the specified value according to the Bound.TODO: Add better support for SharedBlock Markers so that we have fewer Apache Arrow Blocks used to describe constraints.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMarker.Bound
-
Field Summary
Fields Modifier and Type Field Description protected static StringDEFAULT_COLUMN
-
Constructor Summary
Constructors Modifier Constructor Description protectedMarker(Block block, int valuePosition, Marker.Bound bound, boolean nullValue)Marker(Block valueBlock, Marker.Bound bound, boolean nullValue)LOWER UNBOUNDED is specified with an empty value and a ABOVE bound UPPER UNBOUNDED is specified with an empty value and a BELOW bound
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Markerabove(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)static Markerbelow(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)voidclose()intcompareTo(ValueMarker o)booleanequals(Object o)static Markerexactly(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)Marker.BoundgetBound()Retrieves the Bound (BELOW, EXACTLY, ABOVE, etce...) used by this Marker.org.apache.arrow.vector.types.pojo.SchemagetSchema()Provides access to the Apache Arrow Schema used to store the value of this marker.org.apache.arrow.vector.types.pojo.ArrowTypegetType()The Arrow Type of the field this constraint applies to.ObjectgetValue()Retrieves the value held in this Marker.BlockgetValueBlock()Provides access to the Apache Arrow Block used to store the value of this marker.MarkergreaterAdjacent()inthashCode()booleanisAdjacent(Marker other)Adjacency is defined by two Markers being infinitesimally close to each other.booleanisLowerUnbounded()booleanisNullValue()booleanisUpperUnbounded()MarkerlesserAdjacent()static MarkerlowerUnbounded(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)static Markermax(Marker marker1, Marker marker2)static Markermin(Marker marker1, Marker marker2)static MarkernullMarker(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)StringtoString()static MarkerupperUnbounded(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
-
-
-
Field Detail
-
DEFAULT_COLUMN
protected static final String DEFAULT_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Marker
public Marker(Block valueBlock, Marker.Bound bound, boolean nullValue)
LOWER UNBOUNDED is specified with an empty value and a ABOVE bound UPPER UNBOUNDED is specified with an empty value and a BELOW bound
-
Marker
protected Marker(Block block, int valuePosition, Marker.Bound bound, boolean nullValue)
-
-
Method Detail
-
isNullValue
public boolean isNullValue()
- Specified by:
isNullValuein interfaceValueMarker
-
getType
public org.apache.arrow.vector.types.pojo.ArrowType getType()
The Arrow Type of the field this constraint applies to.- Specified by:
getTypein interfaceValueMarker- Returns:
- The ArrowType of the field this ValueSet applies to.
-
getValue
public Object getValue()
Retrieves the value held in this Marker.- Specified by:
getValuein interfaceValueMarker- Returns:
- The value.
-
getBound
public Marker.Bound getBound()
Retrieves the Bound (BELOW, EXACTLY, ABOVE, etce...) used by this Marker.- Specified by:
getBoundin interfaceValueMarker- Returns:
- The Bound.
-
getSchema
public org.apache.arrow.vector.types.pojo.Schema getSchema()
Provides access to the Apache Arrow Schema used to store the value of this marker.- Returns:
- The Apache Arrow Schema used to store the value of this marker.
-
getValueBlock
public Block getValueBlock()
Provides access to the Apache Arrow Block used to store the value of this marker.- Returns:
- The Apache Arrow Block used to store the value of this marker.
-
isUpperUnbounded
public boolean isUpperUnbounded()
- Specified by:
isUpperUnboundedin interfaceValueMarker
-
isLowerUnbounded
public boolean isLowerUnbounded()
- Specified by:
isLowerUnboundedin interfaceValueMarker
-
isAdjacent
public boolean isAdjacent(Marker other)
Adjacency is defined by two Markers being infinitesimally close to each other. This means they must share the same value and have adjacent Bounds.
-
greaterAdjacent
public Marker greaterAdjacent()
-
lesserAdjacent
public Marker lesserAdjacent()
-
upperUnbounded
public static Marker upperUnbounded(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
-
lowerUnbounded
public static Marker lowerUnbounded(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
-
above
public static Marker above(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
-
exactly
public static Marker exactly(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
-
nullMarker
public static Marker nullMarker(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
-
below
public static Marker below(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
-
compareTo
public int compareTo(ValueMarker o)
- Specified by:
compareToin interfaceComparable<ValueMarker>
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-