public final class ColumnVector extends ColumnView
Modifier and Type | Class and Description |
---|---|
static interface |
ColumnVector.EventHandler
Interface to handle events for this ColumnVector.
|
protected static class |
ColumnVector.OffHeapState
Holds the off heap state of the column vector so we can clean it up, even if it is leaked.
|
ColumnView.FindOptions
offHeap, rows, type, UNKNOWN_NULL_COUNT, viewHandle
Constructor and Description |
---|
ColumnVector(DType type,
long rows,
Optional<Long> nullCount,
DeviceMemoryBuffer dataBuffer,
DeviceMemoryBuffer validityBuffer,
DeviceMemoryBuffer offsetBuffer)
Create a new column vector based off of data already on the device.
|
ColumnVector(DType type,
long rows,
Optional<Long> nullCount,
DeviceMemoryBuffer dataBuffer,
DeviceMemoryBuffer validityBuffer,
DeviceMemoryBuffer offsetBuffer,
List<DeviceMemoryBuffer> toClose,
long[] childHandles)
Create a new column vector based off of data already on the device with child columns.
|
ColumnVector(long nativePointer)
Wrap an existing on device cudf::column with the corresponding ColumnVector.
|
Modifier and Type | Method and Description |
---|---|
static ColumnVector |
boolFromBytes(byte... values)
Create a new vector from the given values.
|
static ColumnVector |
build(DType type,
int rows,
java.util.function.Consumer<HostColumnVector.Builder> init)
Create a new vector.
|
static ColumnVector |
build(int rows,
long stringBufferSize,
java.util.function.Consumer<HostColumnVector.Builder> init) |
ColumnVector |
castTo(DType type)
Generic method to cast ColumnVector
When casting from a Date, Timestamp, or Boolean to a numerical type the underlying numerical
representation of the data will be used for the cast.
|
void |
close()
Close this Vector and free memory allocated for HostMemoryBuffer and DeviceMemoryBuffer
|
static ColumnVector |
concatenate(ColumnView... columns)
Create a new vector by concatenating multiple columns together.
|
ColumnVector |
copyToColumnVector()
For a ColumnVector this is really just incrementing the reference count.
|
static ColumnVector |
daysFromInts(int... values)
Create a new vector from the given values.
|
static ColumnVector |
decimalFromBigInt(int scale,
BigInteger... values)
Create a new decimal vector from BigIntegers
Compared with scale of [[java.math.BigDecimal]], the scale here represents the opposite meaning.
|
static ColumnVector |
decimalFromBoxedInts(int scale,
Integer... values)
Create a new decimal vector from boxed unscaled values (Integer array) and scale.
|
static ColumnVector |
decimalFromBoxedLongs(int scale,
Long... values)
Create a new decimal vector from boxed unscaled values (Long array) and scale.
|
static ColumnVector |
decimalFromDoubles(DType type,
RoundingMode mode,
double... values)
Create a new decimal vector from double floats with specific DecimalType and RoundingMode.
|
static ColumnVector |
decimalFromInts(int scale,
int... values)
Create a new decimal vector from unscaled values (int array) and scale.
|
static ColumnVector |
decimalFromLongs(int scale,
long... values)
Create a new decimal vector from unscaled values (long array) and scale.
|
static ColumnVector |
durationDaysFromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static ColumnVector |
durationDaysFromInts(int... values)
Create a new vector from the given values.
|
static ColumnVector |
durationMicroSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationMicroSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationMilliSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationMilliSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationNanoSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationNanoSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
durationSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
empty(HostColumnVector.DataType colType)
Creates an empty column according to the data type.
|
static ColumnVector |
emptyStructs(HostColumnVector.DataType dataType,
long numRows)
This method is evolving, unstable and currently test only.
|
static ColumnVector |
fromArrow(DType type,
long numRows,
long nullCount,
ByteBuffer data,
ByteBuffer validity,
ByteBuffer offsets)
Create a ColumnVector from the Apache Arrow byte buffers passed in.
|
static ColumnVector |
fromBooleans(boolean... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedBooleans(Boolean... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedBytes(Byte... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedDoubles(Double... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedFloats(Float... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedShorts(Short... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedUnsignedBytes(Byte... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedUnsignedInts(Integer... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedUnsignedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBoxedUnsignedShorts(Short... values)
Create a new vector from the given values.
|
static ColumnVector |
fromBytes(byte... values)
Create a new vector from the given values.
|
static ColumnVector |
fromDecimals(BigDecimal... values)
Create a new vector from the given values.
|
static ColumnVector |
fromDoubles(double... values)
Create a new vector from the given values.
|
static ColumnVector |
fromFloats(float... values)
Create a new vector from the given values.
|
static ColumnVector |
fromInts(int... values)
Create a new vector from the given values.
|
static <T> ColumnVector |
fromLists(HostColumnVector.DataType dataType,
List<T>... lists)
This method is evolving, unstable and currently test only.
|
static ColumnVector |
fromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
fromScalar(Scalar scalar,
int rows)
Create a new vector of length rows, where each row is filled with the Scalar's
value
|
static ColumnVector |
fromShorts(short... values)
Create a new vector from the given values.
|
static ColumnVector |
fromStrings(String... values)
Create a new string vector from the given values.
|
static ColumnVector |
fromStructs(HostColumnVector.DataType dataType,
HostColumnVector.StructData... lists)
This method is evolving, unstable and currently test only.
|
static ColumnVector |
fromStructs(HostColumnVector.DataType dataType,
List<HostColumnVector.StructData> lists)
This method is evolving, unstable and currently test only.
|
static ColumnVector |
fromUnsignedBytes(byte... values)
Create a new vector from the given values.
|
static ColumnVector |
fromUnsignedInts(int... values)
Create a new vector from the given values.
|
static ColumnVector |
fromUnsignedLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
fromUnsignedShorts(short... values)
Create a new vector from the given values.
|
static ColumnVector |
fromUTF8Strings(byte[]... values)
Create a new string vector from the given values.
|
static ColumnVector |
fromViewWithContiguousAllocation(long columnViewAddress,
DeviceMemoryBuffer buffer)
Creates a ColumnVector from a native column_view using a contiguous device allocation.
|
BaseDeviceMemoryBuffer |
getDeviceBufferFor(BufferType type)
Get access to the raw device buffer for this column.
|
ColumnVector.EventHandler |
getEventHandler()
Returns the current event handler for this ColumnVector or null if no handler
is associated.
|
long |
getNullCount()
Returns the number of nulls in the data.
|
int |
getRefCount()
Returns this column's current refcount
|
boolean |
hasNulls()
Returns if the vector has nulls.
|
boolean |
hasValidityVector()
Returns if the vector has a validity vector allocated or not.
|
ColumnVector |
incRefCount()
Increment the reference count for this column.
|
static ColumnVector |
listConcatenateByRow(boolean ignoreNull,
ColumnView... columns)
Concatenate columns of lists horizontally (row by row), combining a corresponding row
from each column into a single list row of a new column.
|
static ColumnVector |
listConcatenateByRow(ColumnView... columns)
Concatenate columns of lists horizontally (row by row), combining a corresponding row
from each column into a single list row of a new column.
|
static ColumnVector |
makeList(ColumnView... columns)
Create a LIST column from the given columns.
|
static ColumnVector |
makeList(long rows,
DType type,
ColumnView... columns)
Create a LIST column from the given columns.
|
ColumnVector |
makeListFromOffsets(long rows,
ColumnView offsets)
Create a LIST column from the current column and a given offsets column.
|
static ColumnVector |
makeStruct(ColumnView... columns)
Create a new struct vector made up of existing columns.
|
static ColumnVector |
makeStruct(long rows,
ColumnView... columns)
Create a new struct vector made up of existing columns.
|
static ColumnVector |
md5Hash(ColumnView... columns)
Create a new vector containing the MD5 hash of each row in the table.
|
void |
noWarnLeakExpected()
This is a really ugly API, but it is possible that the lifecycle of a column of
data may not have a clear lifecycle thanks to java and GC.
|
static ColumnVector |
sequence(ColumnView start,
ColumnView size)
Create a list column in which each row is a sequence of values starting from a `start` value,
incrementing by one, and its cardinality is specified by a `size` value.
|
static ColumnVector |
sequence(ColumnView start,
ColumnView size,
ColumnView step)
Create a list column in which each row is a sequence of values starting from a `start` value,
incrementing by a `step` value, and its cardinality is specified by a `size` value.
|
static ColumnVector |
sequence(Scalar initialValue,
int rows)
Create a new vector of length rows, starting at the initialValue and going by 1 each time.
|
static ColumnVector |
sequence(Scalar initialValue,
Scalar step,
int rows)
Create a new vector of length rows, starting at the initialValue and going by step each time.
|
ColumnVector.EventHandler |
setEventHandler(ColumnVector.EventHandler newHandler)
Set an event handler for this vector.
|
static ColumnVector |
stringConcatenate(ColumnView[] columns)
Concatenate columns of strings together, combining a corresponding row from each column
into a single string row of a new column with no separator string inserted between each
combined string and maintaining null values in combined rows.
|
static ColumnVector |
stringConcatenate(ColumnView[] columns,
ColumnView sepCol)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
stringConcatenate(ColumnView[] columns,
ColumnView sepCol,
Scalar separatorNarep,
Scalar colNarep,
boolean separateNulls)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
stringConcatenate(Scalar separator,
Scalar narep,
ColumnView[] columns)
Concatenate columns of strings together, combining a corresponding row from each column into
a single string row of a new column.
|
static ColumnVector |
stringConcatenate(Scalar separator,
Scalar narep,
ColumnView[] columns,
boolean separateNulls)
Concatenate columns of strings together, combining a corresponding row from each column into
a single string row of a new column.
|
static ColumnVector |
timestampDaysFromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampMicroSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampMicroSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampMilliSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampMilliSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampNanoSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampNanoSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static ColumnVector |
timestampSecondsFromLongs(long... values)
Create a new vector from the given values.
|
String |
toString() |
abs, addCalendricalMonths, addCalendricalMonths, all, all, any, any, applyBooleanMask, approxPercentile, approxPercentile, arccos, arccosh, arcsin, arcsinh, arctan, arctanh, asByteList, asByteList, asBytes, asDoubles, asFloats, asInts, asLongs, asShorts, asStrings, asStrings, asTimestamp, asTimestampDays, asTimestampDays, asTimestampMicroseconds, asTimestampMicroseconds, asTimestampMilliseconds, asTimestampMilliseconds, asTimestampNanoseconds, asTimestampNanoseconds, asTimestampSeconds, asTimestampSeconds, asUnsignedBytes, asUnsignedInts, asUnsignedLongs, asUnsignedShorts, binaryOp, bitCastTo, bitInvert, capitalize, cbrt, ceil, clamp, clamp, codePoints, contains, contains, containsRe, containsRe, copyToHost, copyToHost, copyToHostAsync, copyToHostAsync, cos, cosh, countElements, dateTimeCeil, dateTimeFloor, dateTimeRound, day, dayOfYear, daysInMonth, distinctCount, distinctCount, dropListDuplicates, dropListDuplicatesWithKeysValues, endsWith, exp, extractAllRecord, extractAllRecord, extractDateTimeComponent, extractListElement, extractListElement, extractRe, extractRe, findAndReplaceAll, flattenLists, flattenLists, floor, fromDeviceBuffer, generateListOffsets, getByteCount, getCharLengths, getChildColumnView, getChildColumnViews, getData, getDeviceMemorySize, getHostBytesRequired, getJSONObject, getJSONObject, getListOffsetsView, getMapKeyExistence, getMapKeyExistence, getMapValue, getMapValue, getNativeView, getNumChildren, getOffsets, getRowCount, getScalarElement, getType, getValid, hasNonEmptyNulls, hostPaddingSizeInBytes, hour, ifElse, ifElse, ifElse, ifElse, isFixedPoint, isFloat, isInteger, isInteger, isLeapYear, isNan, isNotNan, isNotNull, isNull, isTimestamp, joinStrings, lastDayOfMonth, like, listContains, listContainsColumn, listContainsNulls, listIndexOf, listIndexOf, listReduce, listReduce, listReduce, listsDifferenceDistinct, listsHaveOverlap, listsIntersectDistinct, listSortRows, listsUnionDistinct, log, log10, log2, logicalCastTo, lower, lstrip, lstrip, makeStructView, makeStructView, matchesRe, matchesRe, max, max, mean, mean, mergeAndSetValidity, min, min, minute, month, nansToNulls, normalizeNANsAndZeros, not, pad, pad, pad, prefixSum, product, product, purgeNonEmptyNulls, quantile, quarterOfYear, reduce, reduce, repeatStrings, repeatStrings, replaceChildrenWithViews, replaceListChild, replaceMultiRegex, replaceNulls, replaceNulls, replaceNulls, replaceRegex, replaceRegex, replaceRegex, replaceRegex, reverseStringsOrLists, rint, rollingWindow, round, round, round, round, rstrip, rstrip, scan, scan, scan, second, segmentedGather, segmentedGather, segmentedReduce, segmentedReduce, segmentedReduce, sin, sinh, slice, split, splitAsViews, sqrt, standardDeviation, standardDeviation, startsWith, stringConcatenateListElements, stringConcatenateListElements, stringConcatenateListElements, stringContains, stringContains, stringLocate, stringLocate, stringLocate, stringReplace, stringReplace, stringReplaceWithBackrefs, stringReplaceWithBackrefs, stringSplit, stringSplit, stringSplit, stringSplit, stringSplit, stringSplit, stringSplitRecord, stringSplitRecord, stringSplitRecord, stringSplitRecord, stringSplitRecord, stringSplitRecord, strip, strip, substring, substring, substring, subVector, subVector, sum, sum, sumOfSquares, sumOfSquares, tan, tanh, title, toHex, toTitle, transform, unaryOp, upper, urlDecode, urlEncode, variance, variance, weekDay, year, zfill
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, and, and, arctan2, arctan2, bitAnd, bitAnd, bitOr, bitOr, bitXor, bitXor, div, div, equalTo, equalTo, equalToNullAware, equalToNullAware, floorDiv, floorDiv, greaterOrEqualTo, greaterOrEqualTo, greaterThan, greaterThan, implicitConversion, lessOrEqualTo, lessOrEqualTo, lessThan, lessThan, log, log, maxNullAware, maxNullAware, minNullAware, minNullAware, mod, mod, mul, mul, notEqualTo, notEqualTo, notEqualToNullAware, notEqualToNullAware, or, or, pmod, pmod, pow, pow, shiftLeft, shiftLeft, shiftRight, shiftRight, shiftRightUnsigned, shiftRightUnsigned, sub, sub, trueDiv, trueDiv
public ColumnVector(long nativePointer)
nativePointer
- host address of the cudf::column object which will be
owned by this instance.public ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer)
type
- the type of the vectorrows
- the number of rows in this vector.nullCount
- the number of nulls in the dataset.dataBuffer
- the data stored on the device. The column vector takes ownership of the
buffer. Do not use the buffer after calling this.validityBuffer
- an optional validity buffer. Must be provided if nullCount != 0. The
column vector takes ownership of the buffer. Do not use the buffer
after calling this.offsetBuffer
- a host buffer required for strings and string categories. The column
vector takes ownership of the buffer. Do not use the buffer after calling
this.public ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer, List<DeviceMemoryBuffer> toClose, long[] childHandles)
type
- the type of the vector, typically a nested typerows
- the number of rows in this vector.nullCount
- the number of nulls in the dataset.dataBuffer
- the data stored on the device. The column vector takes ownership of the
buffer. Do not use the buffer after calling this.validityBuffer
- an optional validity buffer. Must be provided if nullCount != 0. The
column vector takes ownership of the buffer. Do not use the buffer
after calling this.offsetBuffer
- a host buffer required for strings and string categories. The column
vector takes ownership of the buffer. Do not use the buffer after calling
this.toClose
- List of buffers to track and close once done, usually in case of childrenchildHandles
- array of longs for child column view handles.public ColumnVector copyToColumnVector()
copyToColumnVector
in class ColumnView
public static ColumnVector fromViewWithContiguousAllocation(long columnViewAddress, DeviceMemoryBuffer buffer)
columnViewAddress
- address of the native column_viewbuffer
- device buffer containing the data referenced by the column viewpublic ColumnVector.EventHandler setEventHandler(ColumnVector.EventHandler newHandler)
newHandler
- - the EventHandler to use from this point forwardpublic ColumnVector.EventHandler getEventHandler()
public void noWarnLeakExpected()
public void close()
close
in interface AutoCloseable
close
in class ColumnView
public String toString()
toString
in class ColumnView
public ColumnVector incRefCount()
public long getNullCount()
getNullCount
in class ColumnView
public int getRefCount()
public boolean hasValidityVector()
public boolean hasNulls()
public BaseDeviceMemoryBuffer getDeviceBufferFor(BufferType type)
type
- the type of buffer to get access to.public static ColumnVector fromArrow(DType type, long numRows, long nullCount, ByteBuffer data, ByteBuffer validity, ByteBuffer offsets)
type
- - type of the columnnumRows
- - Number of rows in the arrow columnnullCount
- - Null countdata
- - ByteBuffer of the Arrow data buffervalidity
- - ByteBuffer of the Arrow validity bufferoffsets
- - ByteBuffer of the Arrow offsets bufferpublic static ColumnVector fromScalar(Scalar scalar, int rows)
scalar
- - Scalar to use to fill rowsrows
- - Number of rows in the new ColumnVectorpublic static ColumnVector makeStruct(ColumnView... columns)
columns
- the columns to make the struct from.public static ColumnVector makeStruct(long rows, ColumnView... columns)
rows
- the number of rows in the struct. Used for structs with no children.columns
- the columns to make the struct from.public static ColumnVector makeList(ColumnView... columns)
columns
- the columns to make up the list column, in the order they will appear in the
resulting lists.public static ColumnVector makeList(long rows, DType type, ColumnView... columns)
rows
- the number of rows to create, for the special case of an empty list.type
- the type of the child column, for the special case of an empty list.columns
- the columns to make up the list column, in the order they will appear in the
resulting lists.public ColumnVector makeListFromOffsets(long rows, ColumnView offsets)
rows
- the number of rows to create.offsets
- the offsets pointing to row indices of the current column to create an output
LIST column.public static ColumnVector sequence(Scalar initialValue, Scalar step, int rows)
initialValue
- the initial value to start at.step
- the step to add to each subsequent row.rows
- the total number of rowspublic static ColumnVector sequence(Scalar initialValue, int rows)
initialValue
- the initial value to start at.rows
- the total number of rowspublic static ColumnVector sequence(ColumnView start, ColumnView size)
start
- first values in the result sequencessize
- numbers of values in the result sequencespublic static ColumnVector sequence(ColumnView start, ColumnView size, ColumnView step)
start
- first values in the result sequencessize
- numbers of values in the result sequencesstep
- increment values for the result sequences.public static ColumnVector concatenate(ColumnView... columns)
public static ColumnVector stringConcatenate(ColumnView[] columns)
columns
- array of columns containing strings, must be non-emptypublic static ColumnVector stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns)
separator
- string scalar inserted between each string being merged.narep
- string scalar indicating null behavior. If set to null and any string in the row
is null the resulting string will be null. If not null, null values in any column
will be replaced by the specified string.columns
- array of columns containing strings, must be non-emptypublic static ColumnVector stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns, boolean separateNulls)
separator
- string scalar inserted between each string being merged.narep
- string scalar indicating null behavior. If set to null and any string in the row
is null the resulting string will be null. If not null, null values in any column
will be replaced by the specified string.columns
- array of columns containing strings, must be non-emptyseparateNulls
- if true, then the separator is included for null rows if
`narep` is valid.public static ColumnVector stringConcatenate(ColumnView[] columns, ColumnView sepCol)
columns
- array of columns containing stringssepCol
- strings column that provides the separator for a given rowpublic static ColumnVector stringConcatenate(ColumnView[] columns, ColumnView sepCol, Scalar separatorNarep, Scalar colNarep, boolean separateNulls)
columns
- array of columns containing stringssepCol
- strings column that provides the separator for a given rowseparatorNarep
- string scalar indicating null behavior when a separator is null.
If set to null and the separator is null the resulting string will
be null. If not null, this string will be used in place of a null
separator.colNarep
- string that should be used in place of any null strings
found in any column.separateNulls
- if true, then the separator is included for null rows if
`colNarep` is valid.public static ColumnVector listConcatenateByRow(ColumnView... columns)
columns
- array of columns containing lists, must be non-emptypublic static ColumnVector listConcatenateByRow(boolean ignoreNull, ColumnView... columns)
ignoreNull
- whether to ignore null list element of input columns: If true, null list
will be ignored from concatenation; Otherwise, any concatenation involving
a null list element will result in a null listcolumns
- array of columns containing lists, must be non-emptypublic static ColumnVector md5Hash(ColumnView... columns)
columns
- array of columns to hash, must have identical number of rows.public ColumnVector castTo(DType type)
ColumnView.asTimestamp(DType, String)
and ColumnView.asStrings(String)
for casting string to timestamp when the format
is known
Float values when converted to String could be different from the expected default behavior in
Java
e.g.
12.3 => "12.30000019" instead of "12.3"
Double.POSITIVE_INFINITY => "Inf" instead of "INFINITY"
Double.NEGATIVE_INFINITY => "-Inf" instead of "-INFINITY"castTo
in class ColumnView
type
- type of the resulting ColumnVectorpublic static ColumnVector build(DType type, int rows, java.util.function.Consumer<HostColumnVector.Builder> init)
type
- the type of vector to build.rows
- maximum number of rows that the vector can hold.init
- what will initialize the vector.public static ColumnVector build(int rows, long stringBufferSize, java.util.function.Consumer<HostColumnVector.Builder> init)
public static ColumnVector boolFromBytes(byte... values)
public static <T> ColumnVector fromLists(HostColumnVector.DataType dataType, List<T>... lists)
public static ColumnVector fromStructs(HostColumnVector.DataType dataType, List<HostColumnVector.StructData> lists)
public static ColumnVector fromStructs(HostColumnVector.DataType dataType, HostColumnVector.StructData... lists)
public static ColumnVector emptyStructs(HostColumnVector.DataType dataType, long numRows)
public static ColumnVector fromBooleans(boolean... values)
public static ColumnVector fromBytes(byte... values)
public static ColumnVector fromUnsignedBytes(byte... values)
Java does not have an unsigned byte type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromShorts(short... values)
public static ColumnVector fromUnsignedShorts(short... values)
Java does not have an unsigned short type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromInts(int... values)
public static ColumnVector fromUnsignedInts(int... values)
Java does not have an unsigned int type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromLongs(long... values)
public static ColumnVector fromUnsignedLongs(long... values)
Java does not have an unsigned long type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromFloats(float... values)
public static ColumnVector fromDoubles(double... values)
public static ColumnVector daysFromInts(int... values)
public static ColumnVector durationSecondsFromLongs(long... values)
public static ColumnVector timestampSecondsFromLongs(long... values)
public static ColumnVector durationDaysFromInts(int... values)
public static ColumnVector durationMilliSecondsFromLongs(long... values)
public static ColumnVector timestampMilliSecondsFromLongs(long... values)
public static ColumnVector durationMicroSecondsFromLongs(long... values)
public static ColumnVector timestampMicroSecondsFromLongs(long... values)
public static ColumnVector durationNanoSecondsFromLongs(long... values)
public static ColumnVector timestampNanoSecondsFromLongs(long... values)
public static ColumnVector decimalFromInts(int scale, int... values)
public static ColumnVector decimalFromBoxedInts(int scale, Integer... values)
public static ColumnVector decimalFromLongs(int scale, long... values)
public static ColumnVector decimalFromBoxedLongs(int scale, Long... values)
public static ColumnVector decimalFromDoubles(DType type, RoundingMode mode, double... values)
public static ColumnVector decimalFromBigInt(int scale, BigInteger... values)
public static ColumnVector fromStrings(String... values)
public static ColumnVector fromUTF8Strings(byte[]... values)
public static ColumnVector fromDecimals(BigDecimal... values)
public static ColumnVector fromBoxedBooleans(Boolean... values)
public static ColumnVector fromBoxedBytes(Byte... values)
public static ColumnVector fromBoxedUnsignedBytes(Byte... values)
Java does not have an unsigned byte type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromBoxedShorts(Short... values)
public static ColumnVector fromBoxedUnsignedShorts(Short... values)
Java does not have an unsigned short type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromBoxedInts(Integer... values)
public static ColumnVector fromBoxedUnsignedInts(Integer... values)
Java does not have an unsigned int type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromBoxedLongs(Long... values)
public static ColumnVector fromBoxedUnsignedLongs(Long... values)
Java does not have an unsigned long type, so the values will be treated as if the bits represent an unsigned value.
public static ColumnVector fromBoxedFloats(Float... values)
public static ColumnVector fromBoxedDoubles(Double... values)
public static ColumnVector timestampDaysFromBoxedInts(Integer... values)
public static ColumnVector durationDaysFromBoxedInts(Integer... values)
public static ColumnVector durationSecondsFromBoxedLongs(Long... values)
public static ColumnVector timestampSecondsFromBoxedLongs(Long... values)
public static ColumnVector durationMilliSecondsFromBoxedLongs(Long... values)
public static ColumnVector timestampMilliSecondsFromBoxedLongs(Long... values)
public static ColumnVector durationMicroSecondsFromBoxedLongs(Long... values)
public static ColumnVector timestampMicroSecondsFromBoxedLongs(Long... values)
public static ColumnVector durationNanoSecondsFromBoxedLongs(Long... values)
public static ColumnVector timestampNanoSecondsFromBoxedLongs(Long... values)
public static ColumnVector empty(HostColumnVector.DataType colType)
colType
- the data type of the empty columnCopyright © 2024. All rights reserved.