public final class HostColumnVector extends HostColumnVectorCore
Modifier and Type | Class and Description |
---|---|
static class |
HostColumnVector.BasicType |
static class |
HostColumnVector.Builder |
static class |
HostColumnVector.ColumnBuilder
Build
|
static class |
HostColumnVector.DataType |
static interface |
HostColumnVector.EventHandler
Interface to handle events for this HostColumnVector.
|
static class |
HostColumnVector.ListType |
static class |
HostColumnVector.StructData |
static class |
HostColumnVector.StructType |
HostColumnVectorCore.OffHeapState
Constructor and Description |
---|
HostColumnVector(DType type,
long rows,
Optional<Long> nullCount,
HostMemoryBuffer hostDataBuffer,
HostMemoryBuffer hostValidityBuffer,
HostMemoryBuffer offsetBuffer,
List<HostColumnVectorCore> nestedHcv)
Create a new column vector with data populated on the host.
|
Modifier and Type | Method and Description |
---|---|
static HostColumnVector |
boolFromBytes(byte... values)
Create a new vector from the given values.
|
static HostColumnVector |
build(DType type,
int rows,
java.util.function.Consumer<HostColumnVector.Builder> init)
Create a new vector.
|
static HostColumnVector |
build(int rows,
long stringBufferSize,
java.util.function.Consumer<HostColumnVector.Builder> init) |
static HostColumnVector.Builder |
builder(DType type,
int rows)
Create a new Builder to hold the specified number of rows.
|
static HostColumnVector.Builder |
builder(int rows,
long stringBufferSize)
Create a new Builder to hold the specified number of rows and with enough space to hold the
given amount of string data.
|
void |
close()
Close this Vector and free memory allocated for HostMemoryBuffer and DeviceMemoryBuffer
|
ColumnVector |
copyToDevice()
Copy the data to the device.
|
static HostColumnVector |
daysFromInts(int... values)
Create a new vector from the given values.
|
static HostColumnVector |
decimalFromBigIntegers(int scale,
BigInteger... values)
Create a new decimal vector from unscaled values (BigInteger array) and scale.
|
static HostColumnVector |
decimalFromBoxedInts(int scale,
Integer... values)
Create a new decimal vector from boxed unscaled values (Integer array) and scale.
|
static HostColumnVector |
decimalFromBoxedLongs(int scale,
Long... values)
Create a new decimal vector from boxed unscaled values (Long array) and scale.
|
static HostColumnVector |
decimalFromDoubles(DType type,
RoundingMode mode,
double... values)
Create a new decimal vector from double floats with specific DecimalType and RoundingMode.
|
static HostColumnVector |
decimalFromInts(int scale,
int... values)
Create a new decimal vector from unscaled values (int array) and scale.
|
static HostColumnVector |
decimalFromLongs(int scale,
long... values)
Create a new decimal vector from unscaled values (long array) and scale.
|
static HostColumnVector |
durationDaysFromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationDaysFromInts(int... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationMicrosecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationMicrosecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationMillisecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationMillisecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationNanosecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationNanosecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
durationSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
emptyStructs(HostColumnVector.DataType dataType,
long rows) |
static HostColumnVector |
fromBoxedBooleans(Boolean... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedBytes(Byte... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedDoubles(Double... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedFloats(Float... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedShorts(Short... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedUnsignedBytes(Byte... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedUnsignedInts(Integer... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedUnsignedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBoxedUnsignedShorts(Short... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromBytes(byte... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromDecimals(BigDecimal... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromDoubles(double... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromFloats(float... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromInts(int... values)
Create a new vector from the given values.
|
static <T> HostColumnVector |
fromLists(HostColumnVector.DataType dataType,
List<T>... values) |
static HostColumnVector |
fromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromShorts(short... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromStrings(String... values)
Create a new string vector from the given values.
|
static HostColumnVector |
fromStructs(HostColumnVector.DataType dataType,
HostColumnVector.StructData... values) |
static HostColumnVector |
fromStructs(HostColumnVector.DataType dataType,
List<HostColumnVector.StructData> values) |
static HostColumnVector |
fromUnsignedBytes(byte... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromUnsignedInts(int... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromUnsignedLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromUnsignedShorts(short... values)
Create a new vector from the given values.
|
static HostColumnVector |
fromUTF8Strings(byte[]... values)
Create a new string vector from the given values.
|
HostColumnVector.EventHandler |
getEventHandler()
Returns the current event handler for this HostColumnVector or null if no
handler is associated.
|
int |
getRefCount()
Returns this column's current refcount
|
HostColumnVector |
incRefCount()
Increment the reference count for this column.
|
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.
|
HostColumnVector.EventHandler |
setEventHandler(HostColumnVector.EventHandler newHandler)
Set an event handler for this host vector.
|
static HostColumnVector |
timestampDaysFromBoxedInts(Integer... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampMicroSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampMicroSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampMilliSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampMilliSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampNanoSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampNanoSecondsFromLongs(long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampSecondsFromBoxedLongs(Long... values)
Create a new vector from the given values.
|
static HostColumnVector |
timestampSecondsFromLongs(long... values)
Create a new vector from the given values.
|
String |
toString() |
convertDecimal128FromJavaToCudf, getBigDecimal, getBoolean, getByte, getBytesFromList, getChildColumnView, getData, getDouble, getEndListOffset, getFloat, getHostBufferFor, getHostMemorySize, getInt, getJavaString, getList, getLong, getNullCount, getNumChildren, getOffsets, getRowCount, getShort, getStartListOffset, getStruct, getType, getUTF8, getValidity, hasNulls, hasValidityVector, isNull
public HostColumnVector(DType type, long rows, Optional<Long> nullCount, HostMemoryBuffer hostDataBuffer, HostMemoryBuffer hostValidityBuffer, HostMemoryBuffer offsetBuffer, List<HostColumnVectorCore> nestedHcv)
type
- the type of the vectorrows
- the number of rows in the vector.nullCount
- the number of nulls in the vector.hostDataBuffer
- The host side data for the vector. In the case of STRING
this is the string data stored as bytes.hostValidityBuffer
- Arrow-like validity buffer 1 bit per row, with padding for
64-bit alignment.offsetBuffer
- only valid for STRING this is the offsets into
the hostDataBuffer indicating the start and end of a string
entry. It should be (rows + 1) ints.nestedHcv
- list of child HostColumnVectorCore(s) for complex typespublic HostColumnVector.EventHandler setEventHandler(HostColumnVector.EventHandler newHandler)
newHandler
- - the EventHandler to use from this point forwardpublic HostColumnVector.EventHandler getEventHandler()
public void noWarnLeakExpected()
public void close()
close
in interface AutoCloseable
close
in class HostColumnVectorCore
public String toString()
toString
in class HostColumnVectorCore
public HostColumnVector incRefCount()
public int getRefCount()
public ColumnVector copyToDevice()
public static HostColumnVector.Builder builder(DType type, int rows)
#build(int, Consumer)
instead to avoid needing to
close the builder.type
- the type of vector to build.rows
- the number of rows this builder can holdpublic static HostColumnVector.Builder builder(int rows, long stringBufferSize)
#build(int, int, Consumer)
instead to avoid needing to close the builder.rows
- the number of rows this builder can holdstringBufferSize
- the size of the string buffer to allocate.public static HostColumnVector 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 HostColumnVector build(int rows, long stringBufferSize, java.util.function.Consumer<HostColumnVector.Builder> init)
public static <T> HostColumnVector fromLists(HostColumnVector.DataType dataType, List<T>... values)
public static HostColumnVector fromStructs(HostColumnVector.DataType dataType, List<HostColumnVector.StructData> values)
public static HostColumnVector fromStructs(HostColumnVector.DataType dataType, HostColumnVector.StructData... values)
public static HostColumnVector emptyStructs(HostColumnVector.DataType dataType, long rows)
public static HostColumnVector boolFromBytes(byte... values)
public static HostColumnVector fromBytes(byte... values)
public static HostColumnVector 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 HostColumnVector fromShorts(short... values)
public static HostColumnVector 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 HostColumnVector durationNanosecondsFromLongs(long... values)
public static HostColumnVector durationMicrosecondsFromLongs(long... values)
public static HostColumnVector durationMillisecondsFromLongs(long... values)
public static HostColumnVector durationSecondsFromLongs(long... values)
public static HostColumnVector durationDaysFromInts(int... values)
public static HostColumnVector fromInts(int... values)
public static HostColumnVector 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 HostColumnVector fromLongs(long... values)
public static HostColumnVector 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 HostColumnVector fromFloats(float... values)
public static HostColumnVector fromDoubles(double... values)
public static HostColumnVector daysFromInts(int... values)
public static HostColumnVector timestampSecondsFromLongs(long... values)
public static HostColumnVector timestampMilliSecondsFromLongs(long... values)
public static HostColumnVector timestampMicroSecondsFromLongs(long... values)
public static HostColumnVector timestampNanoSecondsFromLongs(long... values)
public static HostColumnVector decimalFromInts(int scale, int... values)
public static HostColumnVector decimalFromBoxedInts(int scale, Integer... values)
public static HostColumnVector decimalFromLongs(int scale, long... values)
public static HostColumnVector decimalFromBoxedLongs(int scale, Long... values)
public static HostColumnVector decimalFromBigIntegers(int scale, BigInteger... values)
public static HostColumnVector decimalFromDoubles(DType type, RoundingMode mode, double... values)
public static HostColumnVector fromStrings(String... values)
public static HostColumnVector fromUTF8Strings(byte[]... values)
public static HostColumnVector fromDecimals(BigDecimal... values)
public static HostColumnVector fromBoxedBooleans(Boolean... values)
public static HostColumnVector fromBoxedBytes(Byte... values)
public static HostColumnVector 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 HostColumnVector fromBoxedShorts(Short... values)
public static HostColumnVector 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 HostColumnVector durationNanosecondsFromBoxedLongs(Long... values)
public static HostColumnVector durationMicrosecondsFromBoxedLongs(Long... values)
public static HostColumnVector durationMillisecondsFromBoxedLongs(Long... values)
public static HostColumnVector durationSecondsFromBoxedLongs(Long... values)
public static HostColumnVector durationDaysFromBoxedInts(Integer... values)
public static HostColumnVector fromBoxedInts(Integer... values)
public static HostColumnVector 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 HostColumnVector fromBoxedLongs(Long... values)
public static HostColumnVector 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 HostColumnVector fromBoxedFloats(Float... values)
public static HostColumnVector fromBoxedDoubles(Double... values)
public static HostColumnVector timestampDaysFromBoxedInts(Integer... values)
public static HostColumnVector timestampSecondsFromBoxedLongs(Long... values)
public static HostColumnVector timestampMilliSecondsFromBoxedLongs(Long... values)
public static HostColumnVector timestampMicroSecondsFromBoxedLongs(Long... values)
public static HostColumnVector timestampNanoSecondsFromBoxedLongs(Long... values)
Copyright © 2024. All rights reserved.