public final class ColumnVector extends ColumnView
修饰符和类型 | 类和描述 |
---|---|
static interface |
ColumnVector.EventHandler
用于处理此 ColumnVector 事件的接口。
|
protected static class |
ColumnVector.OffHeapState
保持列向量的堆外状态,以便即使发生内存泄漏也可以进行清理。
|
ColumnView.FindOptions
offHeap, rows, type, UNKNOWN_NULL_COUNT, viewHandle
构造函数和描述 |
---|
ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer)
基于已在设备上的数据创建一个新的列向量。
|
ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer, List<DeviceMemoryBuffer> toClose, long[] childHandles)
基于已在设备上的数据和子列创建一个新的列向量。
|
ColumnVector(long nativePointer)
将现有设备上的 cudf::column 封装到对应的 ColumnVector 中。
|
修饰符和类型 | 方法和描述 |
---|---|
static ColumnVector |
boolFromBytes(byte... values)
从给定值创建新的向量。
|
static ColumnVector |
build(DType type, int rows, java.util.function.Consumer<HostColumnVector.Builder> init)
创建新的向量。
|
static ColumnVector |
build(int rows, long stringBufferSize, java.util.function.Consumer<HostColumnVector.Builder> init) |
ColumnVector |
castTo(DType type)
用于转换 ColumnVector 的通用方法。将 Date、Timestamp 或 Boolean 类型转换为数值类型时,将使用数据的底层数值表示进行转换。
|
void |
close()
关闭此向量并释放为 HostMemoryBuffer 和 DeviceMemoryBuffer 分配的内存。
|
static ColumnVector |
concatenate(ColumnView... columns)
通过将多个列连接在一起创建新的向量。
|
ColumnVector |
copyToColumnVector()
对于 ColumnVector,这实际上只是增加引用计数。
|
static ColumnVector |
daysFromInts(int... values)
从给定值创建新的向量。
|
static ColumnVector |
decimalFromBigInt(int scale, BigInteger... values)
从 BigInteger 创建新的 decimal 向量。与 [[java.math.BigDecimal]] 的 scale 相比,这里的 scale 表示相反的含义。
|
static ColumnVector |
decimalFromBoxedInts(int scale, Integer... values)
从装箱的未缩放值(Integer 数组)和 scale 创建新的 decimal 向量。
|
static ColumnVector |
decimalFromBoxedLongs(int scale, Long... values)
从装箱的未缩放值(Long 数组)和 scale 创建新的 decimal 向量。
|
static ColumnVector |
decimalFromDoubles(DType type, RoundingMode mode, double... values)
从具有特定 DecimalType 和 RoundingMode 的双精度浮点数创建新的 decimal 向量。
|
static ColumnVector |
decimalFromInts(int scale, int... values)
从未缩放值(int 数组)和 scale 创建新的 decimal 向量。
|
static ColumnVector |
decimalFromLongs(int scale, long... values)
从未缩放值(long 数组)和 scale 创建新的 decimal 向量。
|
static ColumnVector |
durationDaysFromBoxedInts(Integer... values)
从给定值创建新的向量。
|
static ColumnVector |
durationDaysFromInts(int... values)
从给定值创建新的向量。
|
static ColumnVector |
durationMicroSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationMicroSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationMilliSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationMilliSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationNanoSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationNanoSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
durationSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
empty(HostColumnVector.DataType colType)
根据数据类型创建空列。
|
static ColumnVector |
emptyStructs(HostColumnVector.DataType dataType, long numRows)
此方法正在演进中,不稳定,目前仅供测试使用。
|
static ColumnVector |
fromArrow(DType type, long numRows, long nullCount, ByteBuffer data, ByteBuffer validity, ByteBuffer offsets)
从传入的 Apache Arrow 字节缓冲区创建 ColumnVector。
|
static ColumnVector |
fromBooleans(boolean... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedBooleans(Boolean... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedBytes(Byte... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedDoubles(Double... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedFloats(Float... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedInts(Integer... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedShorts(Short... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedUnsignedBytes(Byte... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedUnsignedInts(Integer... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedUnsignedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBoxedUnsignedShorts(Short... values)
从给定值创建新的向量。
|
static ColumnVector |
fromBytes(byte... values)
从给定值创建新的向量。
|
static ColumnVector |
fromDecimals(BigDecimal... values)
从给定值创建新的向量。
|
static ColumnVector |
fromDoubles(double... values)
从给定值创建新的向量。
|
static ColumnVector |
fromFloats(float... values)
从给定值创建新的向量。
|
static ColumnVector |
fromInts(int... values)
从给定值创建新的向量。
|
static <T> ColumnVector |
fromLists(HostColumnVector.DataType dataType, List<T>... lists)
此方法正在演进中,不稳定,目前仅供测试使用。
|
static ColumnVector |
fromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
fromScalar(Scalar scalar, int rows)
创建一个长度为 rows 的新向量,其中每一行都填充了 Scalar 的值。
|
static ColumnVector |
fromShorts(short... values)
从给定值创建新的向量。
|
static ColumnVector |
fromStrings(String... values)
从给定值创建新的字符串向量。
|
static ColumnVector |
fromStructs(HostColumnVector.DataType dataType, HostColumnVector.StructData... lists)
此方法正在演进中,不稳定,目前仅供测试使用。
|
static ColumnVector |
fromStructs(List<HostColumnVector.StructData> lists)
此方法正在演进中,不稳定,目前仅供测试使用。
|
static ColumnVector |
fromUnsignedBytes(byte... values)
从给定值创建新的向量。
|
static ColumnVector |
fromUnsignedInts(int... values)
从给定值创建新的向量。
|
static ColumnVector |
fromUnsignedLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
fromUnsignedShorts(short... values)
从给定值创建新的向量。
|
static ColumnVector |
fromUTF8Strings(byte[]... values)
从给定值创建新的字符串向量。
|
static ColumnVector |
fromViewWithContiguousAllocation(long columnViewAddress, DeviceMemoryBuffer buffer)
使用连续设备分配,从原生 column_view 创建 ColumnVector。
|
BaseDeviceMemoryBuffer |
getDeviceBufferFor(BufferType type)
获取此列的原始设备缓冲区的访问权限。
|
ColumnVector.EventHandler |
getEventHandler()
返回此 ColumnVector 的当前事件处理程序,如果没有关联处理程序则返回 null。
|
long |
getNullCount()
返回数据中的 null 数量。
|
int |
getRefCount()
返回此列当前的引用计数。
|
boolean |
hasNulls()
返回向量是否包含 null。
|
boolean |
hasValidityVector()
返回向量是否已分配有效期向量。
|
ColumnVector |
incRefCount()
增加此列的引用计数。
|
static ColumnVector |
listConcatenateByRow(boolean ignoreNull, ColumnView... columns)
横向(逐行)连接列表列,将每列中对应的行组合成新列的单个列表行。
|
static ColumnVector |
listConcatenateByRow(ColumnView... columns)
横向(逐行)连接列表列,将每列中对应的行组合成新列的单个列表行。
|
static ColumnVector |
makeList(ColumnView... columns)
从给定列创建 LIST 列。
|
static ColumnVector |
makeList(long rows, DType type, ColumnView... columns)
从给定列创建 LIST 列。
|
ColumnVector |
makeListFromOffsets(long rows, ColumnView offsets)
从当前列和给定 offsets 列创建 LIST 列。
|
static ColumnVector |
makeStruct(ColumnView... columns)
创建由现有列组成的新 struct 向量。
|
static ColumnVector |
makeStruct(long rows, ColumnView... columns)
创建由现有列组成的新 struct 向量。
|
static ColumnVector |
md5Hash(ColumnView... columns)
创建一个新向量,其中包含表中每行的 MD5 哈希值。
|
void |
noWarnLeakExpected()
这是一个非常糟糕的 API,但由于 Java 和 GC,数据列的生命周期可能不清晰。此 API 通知内存泄漏跟踪代码,该列的生命周期是预期的,并且在此发生时不会打印大的警告。
|
static ColumnVector |
sequence(ColumnView start, ColumnView size)
创建一个列表列,其中每一行是一系列值,这些值从一个 `start` 值开始,每次递增一,并且其基数由 `size` 值指定。
|
static ColumnVector |
sequence(ColumnView start, ColumnView size, ColumnView step)
创建一个列表列,其中每一行是一系列值,这些值从一个 `start` 值开始,每次递增一个 `step` 值,并且其基数由 `size` 值指定。
|
static ColumnVector |
sequence(Scalar initialValue, int rows)
创建一个长度为 rows 的新向量,从 initialValue 开始,每次递增 1。
|
static ColumnVector |
sequence(Scalar initialValue, Scalar step, int rows)
创建一个长度为 rows 的新向量,从 initialValue 开始,每次递增 step。
|
ColumnVector.EventHandler |
setEventHandler(ColumnVector.EventHandler newHandler)
为此向量设置事件处理程序。
|
static ColumnVector |
stringConcatenate(ColumnView[] columns)
将字符串列连接在一起,将每列中对应的行组合成新列的单个字符串行,合并后的字符串之间不插入分隔符,并保留合并行中的 null 值。
|
static ColumnVector |
stringConcatenate(ColumnView[] columns, ColumnView sepCol)
使用为每行指定的定界符将字符串列连接在一起,并将结果作为字符串列返回。
|
static ColumnVector |
stringConcatenate(ColumnView[] columns, ColumnView sepCol, Scalar separatorNarep, Scalar colNarep, boolean separateNulls)
使用为每行指定的定界符将字符串列连接在一起,并将结果作为字符串列返回。
|
static ColumnVector |
stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns)
将字符串列连接在一起,将每列中对应的行组合成新列的单个字符串行。
|
static ColumnVector |
stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns, boolean separateNulls)
将字符串列连接在一起,将每列中对应的行组合成新列的单个字符串行。
|
static ColumnVector |
timestampDaysFromBoxedInts(Integer... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampMicroSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampMicroSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampMilliSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampMilliSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampNanoSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampNanoSecondsFromLongs(long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampSecondsFromBoxedLongs(Long... values)
从给定值创建新的向量。
|
static ColumnVector |
timestampSecondsFromLongs(long... 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
- 将由该实例拥有的 cudf::column 对象的宿主地址。public ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer)
type
- 向量的类型rows
- 此向量中的行数。nullCount
- 数据集中的 null 值数量。dataBuffer
- 存储在设备上的数据。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。validityBuffer
- 可选的有效性缓冲区。如果 nullCount != 0,则必须提供此缓冲区。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。offsetBuffer
- 字符串和字符串类别的必需宿主缓冲区。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。public ColumnVector(DType type, long rows, Optional<Long> nullCount, DeviceMemoryBuffer dataBuffer, DeviceMemoryBuffer validityBuffer, DeviceMemoryBuffer offsetBuffer, List<DeviceMemoryBuffer> toClose, long[] childHandles)
type
- 向量的类型,通常是嵌套类型rows
- 此向量中的行数。nullCount
- 数据集中的 null 值数量。dataBuffer
- 存储在设备上的数据。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。validityBuffer
- 可选的有效性缓冲区。如果 nullCount != 0,则必须提供此缓冲区。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。offsetBuffer
- 字符串和字符串类别的必需宿主缓冲区。列向量将拥有此缓冲区的控制权。调用此方法后,请勿使用此缓冲区。toClose
- 需要跟踪并在完成后关闭的缓冲区列表,通常用于子节点的情况childHandles
- 用于子列视图句柄的长整型数组。public ColumnVector copyToColumnVector()
copyToColumnVector
在类 ColumnView
中public static ColumnVector fromViewWithContiguousAllocation(long columnViewAddress, DeviceMemoryBuffer buffer)
columnViewAddress
- 原生 column_view 的地址buffer
- 包含列视图引用的数据的设备缓冲区public ColumnVector.EventHandler setEventHandler(ColumnVector.EventHandler newHandler)
newHandler
- - 从此刻起使用的 EventHandlerpublic ColumnVector.EventHandler getEventHandler()
public void noWarnLeakExpected()
public void close()
close
在接口 AutoCloseable
中close
在类 ColumnView
中public String toString()
toString
在类 ColumnView
中public ColumnVector incRefCount()
public long getNullCount()
getNullCount
在类 ColumnView
中public int getRefCount()
public boolean hasValidityVector()
public boolean hasNulls()
public BaseDeviceMemoryBuffer getDeviceBufferFor(BufferType type)
type
- 要访问的缓冲区类型。public static ColumnVector fromArrow(DType type, long numRows, long nullCount, ByteBuffer data, ByteBuffer validity, ByteBuffer offsets)
type
- - 列的类型numRows
- - Arrow 列中的行数nullCount
- - Null 值计数data
- - Arrow 数据缓冲区的 ByteBuffervalidity
- - Arrow 有效性缓冲区的 ByteBufferoffsets
- - Arrow 偏移量缓冲区的 ByteBufferpublic static ColumnVector fromScalar(Scalar scalar, int rows)
scalar
- - 用于填充行的标量rows
- - 新 ColumnVector 中的行数public static ColumnVector makeStruct(ColumnView... columns)
columns
- 用于构建结构体的列。public static ColumnVector makeStruct(long rows, ColumnView... columns)
rows
- 结构体中的行数。用于没有子节点的结构体。columns
- 用于构建结构体的列。public static ColumnVector makeList(ColumnView... columns)
columns
- 构成列表列的列,按照它们在结果列表中出现的顺序排列。public static ColumnVector makeList(long rows, DType type, ColumnView... columns)
rows
- 要创建的行数,用于空列表的特殊情况。type
- 子列的类型,用于空列表的特殊情况。columns
- 构成列表列的列,按照它们在结果列表中出现的顺序排列。public ColumnVector makeListFromOffsets(long rows, ColumnView offsets)
rows
- 要创建的行数。offsets
- 指向当前列行索引的偏移量,用于创建输出 LIST 列。public static ColumnVector sequence(Scalar initialValue, Scalar step, int rows)
initialValue
- 起始的初始值。step
- 添加到每个后续行的步长。rows
- 总行数public static ColumnVector sequence(Scalar initialValue, int rows)
initialValue
- 起始的初始值。rows
- 总行数public static ColumnVector sequence(ColumnView start, ColumnView size)
start
- 结果序列中的第一个值size
- 结果序列中的值数量public static ColumnVector sequence(ColumnView start, ColumnView size, ColumnView step)
start
- 结果序列中的第一个值size
- 结果序列中的值数量step
- 结果序列的增量值。public static ColumnVector concatenate(ColumnView... columns)
public static ColumnVector stringConcatenate(ColumnView[] columns)
columns
- 包含字符串的列数组,必须非空public static ColumnVector stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns)
separator
- 插入到每个合并字符串之间的字符串标量。narep
- 指示 null 行为的字符串标量。如果设置为 null 且行中的任何字符串为 null,则结果字符串将为 null。如果不为 null,则任何列中的 null 值将替换为指定的字符串。columns
- 包含字符串的列数组,必须非空public static ColumnVector stringConcatenate(Scalar separator, Scalar narep, ColumnView[] columns, boolean separateNulls)
separator
- 插入到每个合并字符串之间的字符串标量。narep
- 指示 null 行为的字符串标量。如果设置为 null 且行中的任何字符串为 null,则结果字符串将为 null。如果不为 null,则任何列中的 null 值将替换为指定的字符串。columns
- 包含字符串的列数组,必须非空separateNulls
- 如果为 true,则如果 `narep` 有效,则 null 行也包含分隔符。public static ColumnVector stringConcatenate(ColumnView[] columns, ColumnView sepCol)
columns
- 包含字符串的列数组sepCol
- 提供给定行分隔符的字符串列public static ColumnVector stringConcatenate(ColumnView[] columns, ColumnView sepCol, Scalar separatorNarep, Scalar colNarep, boolean separateNulls)
columns
- 包含字符串的列数组sepCol
- 提供给定行分隔符的字符串列separatorNarep
- 当分隔符为 null 时指示 null 行为的字符串标量。如果设置为 null 且分隔符为 null,则结果字符串将为 null。如果不为 null,此字符串将用于代替 null 分隔符。colNarep
- 应替换在任何列中找到的任何 null 字符串的字符串。separateNulls
- 如果为 true,则如果 `colNarep` 有效,则 null 行也包含分隔符。public static ColumnVector listConcatenateByRow(ColumnView... columns)
columns
- 包含列表的列数组,必须非空public static ColumnVector listConcatenateByRow(boolean ignoreNull, ColumnView... columns)
ignoreNull
- 是否忽略输入列的 null 列表元素:如果为 true,则 null 列表将从连接中忽略;否则,任何涉及 null 列表元素的连接都将导致 null 列表。columns
- 包含列表的列数组,必须非空public static ColumnVector md5Hash(ColumnView... columns)
columns
- 要进行哈希计算的列数组,必须具有相同的行数。public ColumnVector castTo(DType type)
ColumnView.asTimestamp(DType, String)
和 ColumnView.asStrings(String)
以将字符串转换为时间戳。浮点值转换为字符串后可能与 Java 中预期的默认行为不同,例如 12.3 => "12.30000019" 而不是 "12.3",Double.POSITIVE_INFINITY => "Inf" 而不是 "INFINITY",Double.NEGATIVE_INFINITY => "-Inf" 而不是 "-INFINITY"。castTo
在类 ColumnView
中type
- 结果 ColumnVector 的类型public static ColumnVector build(DType type, int rows, java.util.function.Consumer<HostColumnVector.Builder> init)
type
- 要构建的向量类型。rows
- 向量可容纳的最大行数。init
- 用于初始化向量的内容。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 没有无符号字节类型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromShorts(short... values)
public static ColumnVector fromUnsignedShorts(short... values)
Java 没有无符号短整型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromInts(int... values)
public static ColumnVector fromUnsignedInts(int... values)
Java 没有无符号整型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromLongs(long... values)
public static ColumnVector fromUnsignedLongs(long... values)
Java 没有无符号长整型,因此这些值将被视为其位表示无符号值。
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 没有无符号字节类型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromBoxedShorts(Short... values)
public static ColumnVector fromBoxedUnsignedShorts(Short... values)
Java 没有无符号短整型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromBoxedInts(Integer... values)
public static ColumnVector fromBoxedUnsignedInts(Integer... values)
Java 没有无符号整型,因此这些值将被视为其位表示无符号值。
public static ColumnVector fromBoxedLongs(Long... values)
public static ColumnVector fromBoxedUnsignedLongs(Long... values)
Java 没有无符号长整型,因此这些值将被视为其位表示无符号值。
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
- 空列的数据类型Copyright © 2025. 保留所有权利。