Class HeapDoubleVector
java.lang.Object
org.apache.flink.table.data.columnar.vector.writable.AbstractWritableVector
org.apache.flink.table.data.columnar.vector.heap.AbstractHeapVector
org.apache.flink.table.data.columnar.vector.heap.HeapDoubleVector
- All Implemented Interfaces:
Serializable,ColumnVector,DoubleColumnVector,WritableColumnVector,WritableDoubleVector
This class represents a nullable double precision floating point column vector. This class will
be used for operations on all floating point double types and as such will use a 64-bit double
value to hold the biggest possible value.
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.flink.table.data.columnar.vector.heap.AbstractHeapVector
BYTE_ARRAY_OFFSET, dictionaryIds, DOUBLE_ARRAY_OFFSET, FLOAT_ARRAY_OFFSET, INT_ARRAY_OFFSET, isNull, LITTLE_ENDIAN, LONG_ARRAY_OFFSET, UNSAFEFields inherited from class org.apache.flink.table.data.columnar.vector.writable.AbstractWritableVector
dictionary, noNulls -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfill(double value) Fill the column vector with the provided value.doublegetDouble(int i) voidsetDouble(int i, double value) Set double at rowId with the provided value.voidsetDoublesFromBinary(int rowId, int count, byte[] src, int srcIndex) Set doubles from binary, need use UNSAFE to copy.Methods inherited from class org.apache.flink.table.data.columnar.vector.heap.AbstractHeapVector
fillWithNulls, getDictionaryIds, getLen, isNullAt, reserveDictionaryIds, reset, setNullAt, setNullsMethods inherited from class org.apache.flink.table.data.columnar.vector.writable.AbstractWritableVector
hasDictionary, setDictionaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.table.data.columnar.vector.ColumnVector
isNullAtMethods inherited from interface org.apache.flink.table.data.columnar.vector.writable.WritableColumnVector
fillWithNulls, getDictionaryIds, hasDictionary, reserveDictionaryIds, reset, setDictionary, setNullAt, setNulls
-
Field Details
-
vector
public double[] vector
-
-
Constructor Details
-
HeapDoubleVector
public HeapDoubleVector(int len) Don't use this except for testing purposes.- Parameters:
len- the number of rows
-
-
Method Details
-
getDouble
public double getDouble(int i) - Specified by:
getDoublein interfaceDoubleColumnVector
-
setDouble
public void setDouble(int i, double value) Description copied from interface:WritableDoubleVectorSet double at rowId with the provided value.- Specified by:
setDoublein interfaceWritableDoubleVector
-
setDoublesFromBinary
public void setDoublesFromBinary(int rowId, int count, byte[] src, int srcIndex) Description copied from interface:WritableDoubleVectorSet doubles from binary, need use UNSAFE to copy.- Specified by:
setDoublesFromBinaryin interfaceWritableDoubleVector- Parameters:
rowId- set start rowId.count- count for double, so the bytes size is count * 8.src- source binary.srcIndex- source binary index, it is the index for byte index.
-
fill
public void fill(double value) Description copied from interface:WritableDoubleVectorFill the column vector with the provided value.- Specified by:
fillin interfaceWritableDoubleVector
-