Class FormulaKernelAdapter
java.lang.Object
com.illumon.iris.db.v2.select.Formula
com.illumon.iris.db.v2.select.formula.FormulaKernelAdapter
- All Implemented Interfaces:
ElementSource
public class FormulaKernelAdapter extends Formula
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.select.Formula
Formula.FillContext, Formula.GetContext
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FormulaKernelAdapter(Index index, FormulaSourceDescriptor sourceDescriptor, Map<String,? extends ColumnSource> columnSources, FormulaKernel kernel)
-
Method Summary
Modifier and Type Method Description void
fillChunk(Formula.FillContext __context, WritableChunk<? super Attributes.Values> __destination, OrderedKeys __orderedKeys)
void
fillPrevChunk(Formula.FillContext __context, WritableChunk<? super Attributes.Values> __destination, OrderedKeys __orderedKeys)
Object
get(long k)
Get the value from the source.Boolean
getBoolean(long k)
Get the value at the index as a Boolean.byte
getByte(long k)
Get the value at the index as a byte.char
getChar(long k)
Get the value at the index as a char.protected ChunkType
getChunkType()
double
getDouble(long k)
Get the value at the index as a double.float
getFloat(long k)
Get the value at the index as a float.int
getInt(long k)
Get the value at the index as an int.long
getLong(long k)
Get the value at the index as a long.Object
getPrev(long k)
Get the previous value at the index.Boolean
getPrevBoolean(long k)
Get the previous value at the index as a Boolean.byte
getPrevByte(long k)
Get the previous value at the index as a byte.char
getPrevChar(long k)
Get the previous value at the index as a char.double
getPrevDouble(long k)
Get the previous value at the index as a double.float
getPrevFloat(long k)
Get the previous value at the index as a float.int
getPrevInt(long k)
Get the previous value at the index as an int.long
getPrevLong(long k)
Get the previous value at the index as a long.short
getPrevShort(long k)
Get the previous value at the index as a short.short
getShort(long k)
Get the value at the index as a short.com.illumon.iris.db.v2.select.formula.FormulaKernelAdapter.AdapterContext
makeFillContext(int chunkCapacity)
Methods inherited from class com.illumon.iris.db.v2.select.Formula
getChunk, getIndex, getPrevChunk, makeGetContext
-
Constructor Details
-
FormulaKernelAdapter
public FormulaKernelAdapter(Index index, FormulaSourceDescriptor sourceDescriptor, Map<String,? extends ColumnSource> columnSources, FormulaKernel kernel)
-
-
Method Details
-
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
- Specified by:
get
in classFormula
- Parameters:
k
- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
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
- Specified by:
getPrev
in classFormula
- Parameters:
k
- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
getBoolean
Description copied from interface:ElementSource
Get the value at the index as a Boolean.- Specified by:
getBoolean
in interfaceElementSource
- Overrides:
getBoolean
in classFormula
- Parameters:
k
- the location in index space to get the value from.- Returns:
- the boolean at the index, potentially null.
-
getByte
public byte getByte(long k)Description copied from interface:ElementSource
Get the value at the index as a byte.- Specified by:
getByte
in interfaceElementSource
- Overrides:
getByte
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as a char.- Specified by:
getChar
in interfaceElementSource
- Overrides:
getChar
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as a double.- Specified by:
getDouble
in interfaceElementSource
- Overrides:
getDouble
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as a float.- Specified by:
getFloat
in interfaceElementSource
- Overrides:
getFloat
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as an int.- Specified by:
getInt
in interfaceElementSource
- Overrides:
getInt
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as a long.- Specified by:
getLong
in interfaceElementSource
- Overrides:
getLong
in classFormula
- Parameters:
k
- 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 k)Description copied from interface:ElementSource
Get the value at the index as a short.- Specified by:
getShort
in interfaceElementSource
- Overrides:
getShort
in classFormula
- Parameters:
k
- 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
- Overrides:
getPrevBoolean
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevByte
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevChar
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevDouble
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevFloat
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevInt
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevLong
in classFormula
- Parameters:
k
- 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 k)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
- Overrides:
getPrevShort
in classFormula
- Parameters:
k
- 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
-
getChunkType
- Specified by:
getChunkType
in classFormula
-
fillChunk
public void fillChunk(@NotNull Formula.FillContext __context, @NotNull WritableChunk<? super Attributes.Values> __destination, @NotNull OrderedKeys __orderedKeys) -
fillPrevChunk
public void fillPrevChunk(@NotNull Formula.FillContext __context, @NotNull WritableChunk<? super Attributes.Values> __destination, @NotNull OrderedKeys __orderedKeys)- Specified by:
fillPrevChunk
in classFormula
-
makeFillContext
public com.illumon.iris.db.v2.select.formula.FormulaKernelAdapter.AdapterContext makeFillContext(int chunkCapacity)- Specified by:
makeFillContext
in classFormula
-