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 class
Marker.Bound
-
Field Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_COLUMN
-
Constructor Summary
Constructors Modifier Constructor Description protected
Marker(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 Marker
above(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
static Marker
below(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
void
close()
int
compareTo(ValueMarker o)
boolean
equals(Object o)
static Marker
exactly(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type, Object value)
Marker.Bound
getBound()
Retrieves the Bound (BELOW, EXACTLY, ABOVE, etce...) used by this Marker.org.apache.arrow.vector.types.pojo.Schema
getSchema()
Provides access to the Apache Arrow Schema used to store the value of this marker.org.apache.arrow.vector.types.pojo.ArrowType
getType()
The Arrow Type of the field this constraint applies to.Object
getValue()
Retrieves the value held in this Marker.Block
getValueBlock()
Provides access to the Apache Arrow Block used to store the value of this marker.Marker
greaterAdjacent()
int
hashCode()
boolean
isAdjacent(Marker other)
Adjacency is defined by two Markers being infinitesimally close to each other.boolean
isLowerUnbounded()
boolean
isNullValue()
boolean
isUpperUnbounded()
Marker
lesserAdjacent()
static Marker
lowerUnbounded(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
static Marker
max(Marker marker1, Marker marker2)
static Marker
min(Marker marker1, Marker marker2)
static Marker
nullMarker(BlockAllocator allocator, org.apache.arrow.vector.types.pojo.ArrowType type)
String
toString()
static Marker
upperUnbounded(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:
isNullValue
in interfaceValueMarker
-
getType
public org.apache.arrow.vector.types.pojo.ArrowType getType()
The Arrow Type of the field this constraint applies to.- Specified by:
getType
in interfaceValueMarker
- Returns:
- The ArrowType of the field this ValueSet applies to.
-
getValue
public Object getValue()
Retrieves the value held in this Marker.- Specified by:
getValue
in interfaceValueMarker
- Returns:
- The value.
-
getBound
public Marker.Bound getBound()
Retrieves the Bound (BELOW, EXACTLY, ABOVE, etce...) used by this Marker.- Specified by:
getBound
in 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:
isUpperUnbounded
in interfaceValueMarker
-
isLowerUnbounded
public boolean isLowerUnbounded()
- Specified by:
isLowerUnbounded
in 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:
compareTo
in interfaceComparable<ValueMarker>
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-