public class HostColumnVectorCore extends Object implements AutoCloseable
修饰符和类型 | 类和描述 |
---|---|
protected static class |
HostColumnVectorCore.OffHeapState
持有列向量的堆外状态,以便即使发生内存泄漏也能进行清理。
|
修饰符和类型 | 字段和描述 |
---|---|
protected List<HostColumnVectorCore> |
children |
protected Optional<Long> |
nullCount |
protected HostColumnVectorCore.OffHeapState |
offHeap |
protected long |
rows |
protected DType |
type |
构造器和描述 |
---|
HostColumnVectorCore(DType type, long rows, Optional<Long> nullCount, HostMemoryBuffer data, HostMemoryBuffer validity, HostMemoryBuffer offsets, List<HostColumnVectorCore> nestedChildren) |
修饰符和类型 | 方法和描述 |
---|---|
void |
close()
关闭列的方法
|
protected static byte[] |
convertDecimal128FromJavaToCudf(byte[] bytes) |
BigDecimal |
getBigDecimal(long index)
获取索引处的 BigDecimal 值。
|
boolean |
getBoolean(long index)
获取索引处的 boolean 值
|
byte |
getByte(long index)
获取索引处的值。
|
byte[] |
getBytesFromList(long rowIndex)
警告:int8 或 uint8 列表的特殊情况,不支持空列表值或嵌套列表。从 int8 或 uint8 类型的列表列中获取索引处的字节数组。
|
HostColumnVectorCore |
getChildColumnView(int childIndex) |
HostMemoryBuffer |
getData()
返回给定主机端列向量的数据缓冲区
|
double |
getDouble(long index)
获取索引处的值。
|
long |
getEndListOffset(long index)
获取索引处列表或字符串的结束元素偏移量。
|
float |
getFloat(long index)
获取索引处的值。
|
HostMemoryBuffer |
getHostBufferFor(BufferType type)
获取此列的原始主机缓冲区。
|
long |
getHostMemorySize()
返回用于存储列/有效性数据(非元数据)的主机内存量。
|
int |
getInt(long index)
获取索引处的值。
|
String |
getJavaString(long index)
获取索引处的值。
|
List |
getList(long rowIndex)
警告:严格用于测试。
|
long |
getLong(long index)
获取索引处的值。
|
long |
getNullCount()
返回数据中的 null 数量。
|
int |
getNumChildren()
返回此列的子对象数量
|
HostMemoryBuffer |
getOffsets()
返回偏移量缓冲区
|
long |
getRowCount()
返回给定主机端列向量的行数
|
short |
getShort(long index)
获取索引处的值。
|
long |
getStartListOffset(long index)
获取索引处列表或字符串的起始元素偏移量
|
HostColumnVector.StructData |
getStruct(int rowIndex)
警告:严格用于测试。
|
DType |
getType()
返回此向量的类型。
|
byte[] |
getUTF8(long index)
获取索引处的原始 UTF8 字节。
|
HostMemoryBuffer |
getValidity()
返回给定主机端列向量的有效性缓冲区
|
boolean |
hasNulls()
返回向量是否包含 null。
|
boolean |
hasValidityVector()
返回向量是否已分配有效性向量。
|
boolean |
isNull(long rowIndex)
返回布尔值指示给定行索引处的元素是否为 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
- 要访问的缓冲区类型。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
- 行索引public boolean hasValidityVector()
public boolean hasNulls()
public long getHostMemorySize()
public void close()
AutoCloseable
中指定:close
protected static byte[] convertDecimal128FromJavaToCudf(byte[] bytes)
版权所有 © 2025。保留所有权利。