Package com.illumon.iris.db.v2.select
Class Formula
java.lang.Object
com.illumon.iris.db.v2.select.Formula
- All Implemented Interfaces:
ElementSource
- Direct Known Subclasses:
FormulaKernelAdapter
The Formula class is used within a FormulaColumn to compute individual table cell values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
fillChunk
(Formula.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys) abstract void
fillPrevChunk
(Formula.FillContext context, WritableChunk<? super Attributes.Values> destination, OrderedKeys orderedKeys) abstract Object
get
(long key) Get the value from the source.getBoolean
(long key) Get the value at the index as a Boolean.byte
getByte
(long key) Get the value at the index as a byte.char
getChar
(long key) Get the value at the index as a char.getChunk
(Formula.GetContext context, OrderedKeys orderedKeys) protected abstract ChunkType
double
getDouble
(long key) Get the value at the index as a double.float
getFloat
(long key) Get the value at the index as a float.getIndex()
int
getInt
(long key) Get the value at the index as an int.long
getLong
(long key) Get the value at the index as a long.abstract Object
getPrev
(long key) Get the previous value at the index.getPrevBoolean
(long key) Get the previous value at the index as a Boolean.byte
getPrevByte
(long key) Get the previous value at the index as a byte.char
getPrevChar
(long key) Get the previous value at the index as a char.getPrevChunk
(Formula.GetContext context, OrderedKeys orderedKeys) double
getPrevDouble
(long key) Get the previous value at the index as a double.float
getPrevFloat
(long key) Get the previous value at the index as a float.int
getPrevInt
(long key) Get the previous value at the index as an int.long
getPrevLong
(long key) Get the previous value at the index as a long.short
getPrevShort
(long key) Get the previous value at the index as a short.short
getShort
(long key) Get the value at the index as a short.abstract Formula.FillContext
makeFillContext
(int chunkCapacity) makeGetContext
(int chunkCapacity)
-
Field Details
-
__index
-
-
Constructor Details
-
Formula
-
-
Method Details
-
getIndex
-
getPrev
Description copied from interface:ElementSource
Get the previous value at the index. Previous values are used during anLTM
update
cycle to process changes in data. Duringnormal
operation previous values will be identical tocurrent
values.- Specified by:
getPrev
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
get
Description copied from interface:ElementSource
Get the value from the source. This may return boxed values for basic types.- Specified by:
get
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
getBoolean
Description copied from interface:ElementSource
Get the value at the index as a Boolean.- Specified by:
getBoolean
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the boolean at the index, potentially null.
-
getByte
public byte getByte(long key) Description copied from interface:ElementSource
Get the value at the index as a byte.- Specified by:
getByte
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the boolean at the index, null values are represented by
QueryConstants.NULL_BYTE
-
getChar
public char getChar(long key) Description copied from interface:ElementSource
Get the value at the index as a char.- Specified by:
getChar
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the char at the index, null values are represented by
QueryConstants.NULL_CHAR
-
getDouble
public double getDouble(long key) Description copied from interface:ElementSource
Get the value at the index as a double.- Specified by:
getDouble
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the double at the index, null values are represented by
QueryConstants.NULL_DOUBLE
-
getFloat
public float getFloat(long key) Description copied from interface:ElementSource
Get the value at the index as a float.- Specified by:
getFloat
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the float at the index, null values are represented by
QueryConstants.NULL_FLOAT
-
getInt
public int getInt(long key) Description copied from interface:ElementSource
Get the value at the index as an int.- Specified by:
getInt
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the int at the index, null values are represented by
QueryConstants.NULL_INT
-
getLong
public long getLong(long key) Description copied from interface:ElementSource
Get the value at the index as a long.- Specified by:
getLong
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the long at the index, null values are represented by
QueryConstants.NULL_LONG
-
getShort
public short getShort(long key) Description copied from interface:ElementSource
Get the value at the index as a short.- Specified by:
getShort
in interfaceElementSource
- Parameters:
key
- the location in index space to get the value from.- Returns:
- the short at the index, null values are represented by
QueryConstants.NULL_SHORT
-
getPrevBoolean
Description copied from interface:ElementSource
Get the previous value at the index as a Boolean. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevBoolean
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous boolean at the index, or null.
-
getPrevByte
public byte getPrevByte(long key) Description copied from interface:ElementSource
Get the previous value at the index as a byte. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevByte
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous boolean at the index, null values are represented by
QueryConstants.NULL_BYTE
-
getPrevChar
public char getPrevChar(long key) Description copied from interface:ElementSource
Get the previous value at the index as a char. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevChar
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous char at the index, null values are represented by
QueryConstants.NULL_CHAR
-
getPrevDouble
public double getPrevDouble(long key) Description copied from interface:ElementSource
Get the previous value at the index as a double. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevDouble
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous double at the index, null values are represented by
QueryConstants.NULL_DOUBLE
-
getPrevFloat
public float getPrevFloat(long key) Description copied from interface:ElementSource
Get the previous value at the index as a float. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevFloat
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous float at the index, null values are represented by
QueryConstants.NULL_FLOAT
-
getPrevInt
public int getPrevInt(long key) Description copied from interface:ElementSource
Get the previous value at the index as an int. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevInt
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous int at the index, null values are represented by
QueryConstants.NULL_INT
-
getPrevLong
public long getPrevLong(long key) Description copied from interface:ElementSource
Get the previous value at the index as a long. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevLong
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous long at the index, null values are represented by
QueryConstants.NULL_LONG
-
getPrevShort
public short getPrevShort(long key) Description copied from interface:ElementSource
Get the previous value at the index as a short. SeeElementSource.getPrev(long)
for more details.- Specified by:
getPrevShort
in interfaceElementSource
- Parameters:
key
- the location in index space to get the previous value from.- Returns:
- the previous short at the index, null values are represented by
QueryConstants.NULL_SHORT
-
makeGetContext
-
makeFillContext
-
getChunk
public Chunk<Attributes.Values> getChunk(@NotNull Formula.GetContext context, @NotNull OrderedKeys orderedKeys) -
getPrevChunk
public Chunk<Attributes.Values> getPrevChunk(@NotNull Formula.GetContext context, @NotNull OrderedKeys orderedKeys) -
fillChunk
public abstract void fillChunk(@NotNull Formula.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys) -
fillPrevChunk
public abstract void fillPrevChunk(@NotNull Formula.FillContext context, @NotNull WritableChunk<? super Attributes.Values> destination, @NotNull OrderedKeys orderedKeys) -
getChunkType
-