public class HostColumnVectorCore extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
protected static class |
HostColumnVectorCore.OffHeapState
Holds the off heap state of the column vector so we can clean it up, even if it is leaked.
|
Modifier and Type | Field and Description |
---|---|
protected List<HostColumnVectorCore> |
children |
protected Optional<Long> |
nullCount |
protected HostColumnVectorCore.OffHeapState |
offHeap |
protected long |
rows |
protected DType |
type |
Constructor and Description |
---|
HostColumnVectorCore(DType type,
long rows,
Optional<Long> nullCount,
HostMemoryBuffer data,
HostMemoryBuffer validity,
HostMemoryBuffer offsets,
List<HostColumnVectorCore> nestedChildren) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close method for the column
|
protected static byte[] |
convertDecimal128FromJavaToCudf(byte[] bytes) |
BigDecimal |
getBigDecimal(long index)
Get the BigDecimal value at index.
|
boolean |
getBoolean(long index)
Get the boolean value at index
|
byte |
getByte(long index)
Get the value at index.
|
byte[] |
getBytesFromList(long rowIndex)
WARNING: Special case for lists of int8 or uint8, does not support null list values or lists
Get array of bytes at index from a list column of int8 or uint8.
|
HostColumnVectorCore |
getChildColumnView(int childIndex) |
HostMemoryBuffer |
getData()
Returns the data buffer for a given host side column vector
|
double |
getDouble(long index)
Get the value at index.
|
long |
getEndListOffset(long index)
Get the ending element offset for the list or string at index.
|
float |
getFloat(long index)
Get the value at index.
|
HostMemoryBuffer |
getHostBufferFor(BufferType type)
Get access to the raw host buffer for this column.
|
long |
getHostMemorySize()
Returns the amount of host memory used to store column/validity data (not metadata).
|
int |
getInt(long index)
Get the value at index.
|
String |
getJavaString(long index)
Get the value at index.
|
List |
getList(long rowIndex)
WARNING: Strictly for test only.
|
long |
getLong(long index)
Get the value at index.
|
long |
getNullCount()
Returns the number of nulls in the data.
|
int |
getNumChildren()
Returns the number of children for this column
|
HostMemoryBuffer |
getOffsets()
Returns the offset buffer
|
long |
getRowCount()
Returns the number of rows for a given host side column vector
|
short |
getShort(long index)
Get the value at index.
|
long |
getStartListOffset(long index)
Get the starting element offset for the list or string at index
|
HostColumnVector.StructData |
getStruct(int rowIndex)
WARNING: Strictly for test only.
|
DType |
getType()
Returns the type of this vector.
|
byte[] |
getUTF8(long index)
Get the raw UTF8 bytes at index.
|
HostMemoryBuffer |
getValidity()
Returns the validity buffer for a given host side column vector
|
boolean |
hasNulls()
Returns if the vector has nulls.
|
boolean |
hasValidityVector()
Returns if the vector has a validity vector allocated or not.
|
boolean |
isNull(long rowIndex)
Method that returns a boolean to indicate if the element at a given row index is null
|
String |
toString() |
protected final HostColumnVectorCore.OffHeapState offHeap
protected final DType type
protected long rows
protected List<HostColumnVectorCore> children
public HostColumnVectorCore(DType type, long rows, Optional<Long> nullCount, HostMemoryBuffer data, HostMemoryBuffer validity, HostMemoryBuffer offsets, List<HostColumnVectorCore> nestedChildren)
public DType getType()
public HostMemoryBuffer getData()
public HostMemoryBuffer getValidity()
public HostMemoryBuffer getOffsets()
public HostColumnVectorCore getChildColumnView(int childIndex)
public long getNullCount()
public long getRowCount()
public int getNumChildren()
public HostMemoryBuffer getHostBufferFor(BufferType type)
type
- the type of buffer to get access to.public byte getByte(long index)
public final short getShort(long index)
public final int getInt(long index)
public long getStartListOffset(long index)
public long getEndListOffset(long index)
public final long getLong(long index)
public final float getFloat(long index)
public final double getDouble(long index)
public final boolean getBoolean(long index)
public final BigDecimal getBigDecimal(long index)
public byte[] getUTF8(long index)
public String getJavaString(long index)
public byte[] getBytesFromList(long rowIndex)
public List getList(long rowIndex)
public HostColumnVector.StructData getStruct(int rowIndex)
public boolean isNull(long rowIndex)
rowIndex
- the row indexpublic boolean hasValidityVector()
public boolean hasNulls()
public long getHostMemorySize()
public void close()
close
in interface AutoCloseable
protected static byte[] convertDecimal128FromJavaToCudf(byte[] bytes)
Copyright © 2024. All rights reserved.