public final class Table extends Object implements AutoCloseable
修饰符和类型 | 类和描述 |
---|---|
静态类 |
Table.DuplicateKeepOption
枚举,用于指定重复行/元素中的哪一个将被复制到输出中。
|
静态类 |
Table.GroupByOperation
表示分组操作的类
|
静态类 |
Table.TableOperation |
静态类 |
Table.TestBuilder
在 GPU 上创建包含 CPU 数据的表。
|
构造方法和描述 |
---|
Table(ColumnVector... columns)
Table 类会创建传入的
ColumnVector 数组的副本。 |
Table(long[] cudfColumns)
从现有设备上的 cudf::column 指针数组创建 Table。
|
修饰符和类型 | 方法和描述 |
---|---|
void |
close() |
静态 Table |
concatenate(Table... tables)
将多个表连接在一起形成一个表。
|
GatherMap[] |
conditionalFullJoinGatherMaps(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,可用于体现两个表之间全连接结果的收集映射。
|
GatherMap[] |
conditionalInnerJoinGatherMaps(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,可用于体现两个表之间内连接结果的收集映射。
|
GatherMap[] |
conditionalInnerJoinGatherMaps(Table rightTable, CompiledExpression condition, long outputRowCount)
计算当条件表达式为真时,可用于体现两个表之间内连接结果的收集映射。
|
long |
conditionalInnerJoinRowCount(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,两个表之间内连接结果的行数。
|
GatherMap |
conditionalLeftAntiJoinGatherMap(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,可用于体现两个表之间左反连接结果的收集映射。
|
GatherMap |
conditionalLeftAntiJoinGatherMap(Table rightTable, CompiledExpression condition, long outputRowCount)
计算当条件表达式为真时,可用于体现两个表之间左反连接结果的收集映射。
|
long |
conditionalLeftAntiJoinRowCount(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,两个表之间左反连接结果的行数。
|
GatherMap[] |
conditionalLeftJoinGatherMaps(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,可用于体现两个表之间左连接结果的收集映射。
|
GatherMap[] |
conditionalLeftJoinGatherMaps(Table rightTable, CompiledExpression condition, long outputRowCount)
计算当条件表达式为真时,可用于体现两个表之间左连接结果的收集映射。
|
long |
conditionalLeftJoinRowCount(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,两个表之间左连接结果的行数。
|
GatherMap |
conditionalLeftSemiJoinGatherMap(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,可用于体现两个表之间左半连接结果的收集映射。
|
GatherMap |
conditionalLeftSemiJoinGatherMap(Table rightTable, CompiledExpression condition, long outputRowCount)
计算当条件表达式为真时,可用于体现两个表之间左半连接结果的收集映射。
|
long |
conditionalLeftSemiJoinRowCount(Table rightTable, CompiledExpression condition)
计算当条件表达式为真时,两个表之间左半连接结果的行数。
|
ContiguousTable[] |
contiguousSplit(int... indices)
在给定边界处分割表,但每次分割的结果具有布局在连续内存范围内的内存。
|
Table |
crossJoin(Table right)
连接两个表,将左表所有行与右表所有行进行连接。
|
int |
distinctCount()
计算表中相互之间不同的行数。
|
int |
distinctCount(NullEquality nullsEqual)
计算表中相互之间不同的行数。
|
Table |
dropDuplicates(int[] keyColumns, Table.DuplicateKeepOption keep, boolean nullsEqual)
将当前表的行复制到输出表,以便忽略关键列中的重复行(即,只复制重复行中的一行)。
|
Table |
explode(int index)
展开列表列的元素。
|
Table |
explodeOuter(int index)
展开列表列的元素。
|
Table |
explodeOuterPosition(int index)
展开列表列的元素,保留任何 null 条目或空列表,并包含一个位置列。
|
Table |
explodePosition(int index)
展开列表列的元素,并包含一个位置列。
|
Table |
filter(ColumnView mask)
使用布尔值列作为掩码过滤此表,返回一个新表。
|
静态 Table |
fromPackedTable(ByteBuffer metadata, DeviceMemoryBuffer data)
从打包表示构建表。
|
GatherMap[] |
fullJoinGatherMaps(HashJoin rightHash)
计算可用于体现两个表之间全相等连接结果的收集映射。
|
GatherMap[] |
fullJoinGatherMaps(HashJoin rightHash, long outputRowCount)
计算可用于体现两个表之间全相等连接结果的收集映射。
|
GatherMap[] |
fullJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间全相等连接结果的收集映射。
|
long |
fullJoinRowCount(HashJoin rightHash)
计算两个表之间全相等连接产生的行数。
|
Table |
gather(ColumnView gatherMap)
根据 `gatherMap` 收集此表的行,以便结果表的列中的第“i”行将包含此表中的第“gatherMap[i]”行。
|
Table |
gather(ColumnView gatherMap, OutOfBoundsPolicy outOfBoundsPolicy)
根据 `gatherMap` 收集此表的行,以便结果表的列中的第“i”行将包含此表中的第“gatherMap[i]”行。
|
ColumnVector |
getColumn(int index)
返回指定索引处的
ColumnVector 。 |
静态 TableWriter |
getCSVBufferWriter(CSVWriterOptions options, HostBufferConsumer bufferConsumer) |
静态 TableWriter |
getCSVBufferWriter(CSVWriterOptions options, HostBufferConsumer bufferConsumer, HostMemoryAllocator hostMemoryAllocator) |
long |
getDeviceMemorySize()
返回设备内存缓冲区大小。
|
long |
getNativeView()
返回此表的本地表视图句柄
|
int |
getNumberOfColumns() |
long |
getRowCount() |
Table.GroupByOperation |
groupBy(GroupByOptions groupByOptions, int... indices)
返回按索引中提供的列分组的聚合操作
|
Table.GroupByOperation |
groupBy(int... indices)
返回按索引中提供的列分组的聚合操作,使用如下默认选项:- 在分组时将 null 视为键。
|
GatherMap[] |
innerDistinctJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间内相等连接结果的收集映射,其中右表保证不包含任何重复的连接键。
|
GatherMap[] |
innerJoinGatherMaps(HashJoin rightHash)
计算可用于体现两个表之间内相等连接结果的收集映射。
|
GatherMap[] |
innerJoinGatherMaps(HashJoin rightHash, long outputRowCount)
计算可用于体现两个表之间内相等连接结果的收集映射。
|
GatherMap[] |
innerJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间内相等连接结果的收集映射。
|
long |
innerJoinRowCount(HashJoin otherHash)
计算两个表之间内相等连接产生的行数。
|
ColumnVector |
interleaveColumns()
将所有列交织成一个单列。
|
GatherMap |
leftAntiJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间左反连接结果的收集映射。
|
GatherMap |
leftDistinctJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
计算一个收集映射,可用于体现两个表之间左相等连接的结果,其中右表保证不包含任何重复的连接键。
|
GatherMap[] |
leftJoinGatherMaps(HashJoin rightHash)
计算可用于体现两个表之间左相等连接结果的收集映射。
|
GatherMap[] |
leftJoinGatherMaps(HashJoin rightHash, long outputRowCount)
计算可用于体现两个表之间左相等连接结果的收集映射。
|
GatherMap[] |
leftJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间左相等连接结果的收集映射。
|
long |
leftJoinRowCount(HashJoin rightHash)
计算两个表之间左相等连接产生的行数。
|
GatherMap |
leftSemiJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
计算可用于体现两个表之间左半连接结果的收集映射。
|
ColumnVector |
lowerBound(boolean[] areNullsSmallest, Table valueTable, boolean[] descFlags)
查找排序表中应插入值以保持顺序的最小索引。
|
ColumnVector |
lowerBound(Table valueTable, OrderByArg... args)
查找排序表中应插入值以保持顺序的最小索引。
|
ChunkedPack |
makeChunkedPack(long bounceBufferSize)
创建一个 `ChunkedPack` 实例,可用于利用大小为 `bounceBufferSize` 的跳跃缓冲区在内存中连续打包此表。
|
ChunkedPack |
makeChunkedPack(long bounceBufferSize, RmmDeviceMemoryResource tempMemoryResource)
创建一个 `ChunkedPack` 实例,可用于利用大小为 `bounceBufferSize` 的跳跃缓冲区在内存中连续打包此表。
|
静态 Table |
merge(List<Table> tables, OrderByArg... args)
合并多个已排序表,保持排序顺序相同。
|
静态 Table |
merge(Table[] tables, OrderByArg... args)
合并多个已排序表,保持排序顺序相同。
|
静态 GatherMap[] |
mixedFullJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算可用于体现两个表之间使用等值和不等值条件混合的全连接结果的收集映射。
|
静态 GatherMap[] |
mixedInnerJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算可用于体现两个表之间使用等值和不等值条件混合的内连接结果的收集映射。
|
静态 GatherMap[] |
mixedInnerJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality, MixedJoinSize joinSize)
计算可用于体现两个表之间使用等值和不等值条件混合的内连接结果的收集映射。
|
静态 MixedJoinSize |
mixedInnerJoinSize(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算两个表之间使用等值和不等值条件混合的内连接的输出大小信息。
|
静态 GatherMap |
mixedLeftAntiJoinGatherMap(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算可用于体现两个表之间使用等值和不等值条件混合的左反连接结果的收集映射。
|
静态 GatherMap[] |
mixedLeftJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算可用于体现两个表之间使用等值和不等值条件混合的左连接结果的收集映射。
|
静态 GatherMap[] |
mixedLeftJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality, MixedJoinSize joinSize)
计算可用于体现两个表之间使用等值和不等值条件混合的左连接结果的收集映射。
|
静态 MixedJoinSize |
mixedLeftJoinSize(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算两个表之间使用等值和不等值条件混合的左连接的输出大小信息。
|
静态 GatherMap |
mixedLeftSemiJoinGatherMap(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
计算可用于体现两个表之间使用等值和不等值条件混合的左半连接结果的收集映射。
|
Table.TableOperation |
onColumns(int... indices) |
Table |
orderBy(OrderByArg... args)
使用排序键对表排序,返回一个新的分配的表。
|
PartitionedTable |
partition(ColumnView partitionMap, int numberOfPartitions)
使用 partitionMap 中的映射对此表进行分区。
|
静态 TableWithMeta |
readAndInferJSON(JSONOptions opts, DataSource ds)
读取 JSON 格式数据并推断列名和 schema。
|
静态 StreamedTableReader |
readArrowIPCChunked(ArrowIPCOptions options, File inputFile)
获取一个读取器,该读取器将返回表。
|
静态 StreamedTableReader |
readArrowIPCChunked(ArrowIPCOptions options, HostBufferProvider provider) |
静态 StreamedTableReader |
readArrowIPCChunked(ArrowIPCOptions options, HostBufferProvider provider, HostMemoryAllocator hostMemoryAllocator)
获取一个读取器,该读取器将返回表。
|
静态 StreamedTableReader |
readArrowIPCChunked(File inputFile)
获取一个读取器,该读取器将返回表。
|
静态 StreamedTableReader |
readArrowIPCChunked(HostBufferProvider provider)
获取一个读取器,该读取器将返回表。
|
静态 Table |
readAvro(AvroOptions opts, byte[] buffer)
读取 Avro 格式数据。
|
静态 Table |
readAvro(AvroOptions opts, byte[] buffer, long offset, long len) |
静态 Table |
readAvro(AvroOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
读取 Avro 格式数据。
|
静态 Table |
readAvro(AvroOptions opts, DataSource ds) |
静态 Table |
readAvro(AvroOptions opts, File path)
读取 Avro 文件。
|
静态 Table |
readAvro(HostMemoryBuffer buffer, long offset, long len)
读取 Avro 格式数据。
|
静态 Table |
readAvro(byte[] buffer)
读取 Avro 格式数据。
|
静态 Table |
readAvro(File path)
使用默认 AvroOptions 读取 Avro 文件。
|
静态 Table |
readCSV(Schema schema, byte[] buffer)
使用默认 CSVOptions 读取 CSV 格式数据。
|
静态 Table |
readCSV(Schema schema, CSVOptions opts, byte[] buffer)
读取 CSV 格式数据。
|
静态 Table |
readCSV(Schema schema, CSVOptions opts, byte[] buffer, long offset, long len) |
静态 Table |
readCSV(Schema schema, CSVOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
读取 CSV 格式数据。
|
静态 Table |
readCSV(Schema schema, CSVOptions opts, DataSource ds) |
静态 Table |
readCSV(Schema schema, CSVOptions opts, File path)
读取 CSV 文件。
|
静态 Table |
readCSV(Schema schema, CSVOptions opts, HostMemoryBuffer buffer, long offset, long len)
读取 CSV 格式数据。
|
静态 Table |
readCSV(Schema schema, File path)
使用默认 CSVOptions 读取 CSV 文件。
|
静态 TableWithMeta |
readJSON(JSONOptions opts, HostMemoryBuffer buffer, long offset, long len)
读取 JSON 格式数据并推断列名和 schema。
|
静态 Table |
readJSON(Schema schema, byte[] buffer)
使用默认 JSONOptions 读取 JSON 格式数据。
|
静态 Table |
readJSON(Schema schema, File path)
使用默认 JSONOptions 读取 JSON 文件。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, byte[] buffer)
读取 JSON 格式数据。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len) |
静态 Table |
readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
读取 JSON 格式数据。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator, int emptyRowCount)
已过时。
此方法已过时,因为未使用 emptyRowCount。请改用不带 emptyRowCount 的方法。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, int emptyRowCount) |
静态 Table |
readJSON(Schema schema, JSONOptions opts, DataSource ds)
读取 JSON 格式数据。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, DataSource ds, int emptyRowCount)
已过时。
此方法已过时,因为未使用 emptyRowCount。请改用不带 emptyRowCount 的方法。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, File path)
读取 JSON 文件。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, HostMemoryBuffer buffer, long offset, long len)
读取 JSON 格式数据。
|
静态 Table |
readJSON(Schema schema, JSONOptions opts, HostMemoryBuffer buffer, long offset, long len, int emptyRowCount)
已过时。
此方法已过时,因为未使用 emptyRowCount。请改用不带 emptyRowCount 的方法。
|
静态 Table |
readORC(byte[] buffer)
读取 ORC 格式数据。
|
静态 Table |
readORC(File path)
使用默认 ORCOptions 读取 ORC 文件。
|
静态 Table |
readORC(ORCOptions opts, byte[] buffer)
读取 ORC 格式数据。
|
静态 Table |
readORC(ORCOptions opts, byte[] buffer, long offset, long len) |
静态 Table |
readORC(ORCOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
读取 ORC 格式数据。
|
静态 Table |
readORC(ORCOptions opts, DataSource ds) |
静态 Table |
readORC(ORCOptions opts, File path)
读取 ORC 文件。
|
静态 Table |
readORC(ORCOptions opts, HostMemoryBuffer buffer, long offset, long len)
读取 ORC 格式数据。
|
静态 Table |
readParquet(byte[] buffer)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(File path)
使用默认 ParquetOptions 读取 Parquet 文件。
|
静态 Table |
readParquet(ParquetOptions opts, byte[] buffer)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(ParquetOptions opts, byte[] buffer, long offset, long len)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(ParquetOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(ParquetOptions opts, DataSource ds)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(ParquetOptions opts, File path)
读取 Parquet 文件。
|
静态 Table |
readParquet(ParquetOptions opts, HostMemoryBuffer... buffers)
读取 Parquet 格式数据。
|
静态 Table |
readParquet(ParquetOptions opts, HostMemoryBuffer buffer, long offset, long len)
读取 Parquet 格式数据。
|
Table |
repeat(ColumnView counts)
通过重复此表的每一行创建一个新表。
|
Table |
repeat(int count)
重复此表的每一行 count 次。
|
PartitionedTable |
roundRobinPartition(int numberOfPartitions, int startPartition)
将表按轮询方式分区到指定数量的分区中。
|
ColumnVector |
rowBitCount()
返回 `table_view` 中所有列每行的近似累计大小(以位为单位)。
|
Table |
sample(long n, boolean replacement, long seed)
从表中随机采集 `n` 个样本 注意:不保留顺序 示例:input: {col1: {1, 2, 3, 4, 5}, col2: {6, 7, 8, 9, 10}} n: 3 replacement: false output: {col1: {3, 1, 4}, col2: {8, 6, 9}} replacement: true output: {col1: {3, 1, 1}, col2: {8, 6, 6}} 如果 `n` > 表行数且 `replacement` == FALSE,则抛出 "logic_error"。
|
Table |
scatter(ColumnView scatterMap, Table target)
将值从源表异地散布到目标表中,返回新的结果表。
|
静态 Table |
scatter(Scalar[] source, ColumnView scatterMap, Table target)
将值从源行异地散布到目标表中,返回新的结果表。
|
ColumnVector |
sortOrder(OrderByArg... args)
获取一个可用于排序数据的收集映射。
|
String |
toString() |
ColumnVector |
upperBound(boolean[] areNullsSmallest, Table valueTable, boolean[] descFlags)
查找排序表中应插入值以保持顺序的最大索引。
|
ColumnVector |
upperBound(Table valueTable, OrderByArg... args)
查找排序表中应插入值以保持顺序的最大索引。
|
静态 TableWriter |
writeArrowIPCChunked(ArrowIPCWriterOptions options, File outputFile)
获取用于将 arrow IPC 数据写入文件的表写入器。
|
静态 TableWriter |
writeArrowIPCChunked(ArrowIPCWriterOptions options, HostBufferConsumer consumer) |
静态 TableWriter |
writeArrowIPCChunked(ArrowIPCWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
获取用于写入 arrow IPC 数据并通过回调处理每个分块的表写入器。
|
静态 void |
writeColumnViewsToParquet(ParquetWriterOptions options, HostBufferConsumer consumer, ColumnView... columnViews) |
静态 void |
writeColumnViewsToParquet(ParquetWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator, ColumnView... columnViews)
这是一个不断发展的 API,很可能会在未来版本中移除。请注意,此功能在不久的将来可能不再存在。
|
void |
writeCSVToFile(CSVWriterOptions options, String outputPath) |
静态 TableWriter |
writeORCChunked(ORCWriterOptions options, File outputFile)
获取用于将 ORC 数据写入文件的表写入器。
|
静态 TableWriter |
writeORCChunked(ORCWriterOptions options, HostBufferConsumer consumer) |
静态 TableWriter |
writeORCChunked(ORCWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
获取用于写入 ORC 数据并通过回调处理每个分块的表写入器。
|
静态 TableWriter |
writeParquetChunked(ParquetWriterOptions options, File outputFile)
获取用于将 Parquet 数据写入文件的表写入器。
|
静态 TableWriter |
writeParquetChunked(ParquetWriterOptions options, HostBufferConsumer consumer) |
静态 TableWriter |
writeParquetChunked(ParquetWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
获取用于写入 Parquet 数据并通过回调处理每个分块的表写入器。
|
public Table(ColumnVector... columns)
ColumnVector
数组的副本。此类关闭时会减少其自身及其所有内容的引用计数,如果引用计数为零则释放资源。columns
- ColumnVector 数组public Table(long[] cudfColumns)
cudfColumns
- 本地句柄数组public long getNativeView()
public ColumnVector getColumn(int index)
ColumnVector
。如果要在表的生命周期之后保留对该列的引用,则需要自行增加该列的引用计数。public final long getRowCount()
public final int getNumberOfColumns()
public void close()
close
在接口中指定 AutoCloseable
public long getDeviceMemorySize()
public static Table readCSV(Schema schema, File path)
schema
- 文件的 schema。您可以使用 Schema.INFERRED 来推断 schema。path
- 要读取的本地文件。public static Table readCSV(Schema schema, CSVOptions opts, File path)
schema
- 文件的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 CSV 解析选项。path
- 要读取的本地文件。public static Table readCSV(Schema schema, byte[] buffer)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。buffer
- 原始 UTF8 格式字节。public static Table readCSV(Schema schema, CSVOptions opts, byte[] buffer)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 CSV 解析选项。buffer
- 原始 UTF8 格式字节。public static Table readCSV(Schema schema, CSVOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 CSV 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器public static Table readCSV(Schema schema, CSVOptions opts, byte[] buffer, long offset, long len)
public static Table readCSV(Schema schema, CSVOptions opts, HostMemoryBuffer buffer, long offset, long len)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 CSV 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readCSV(Schema schema, CSVOptions opts, DataSource ds)
public void writeCSVToFile(CSVWriterOptions options, String outputPath)
public static TableWriter getCSVBufferWriter(CSVWriterOptions options, HostBufferConsumer bufferConsumer, HostMemoryAllocator hostMemoryAllocator)
public static TableWriter getCSVBufferWriter(CSVWriterOptions options, HostBufferConsumer bufferConsumer)
public static Table readJSON(Schema schema, File path)
schema
- 文件的 schema。您可以使用 Schema.INFERRED 来推断 schema。path
- 要读取的本地文件。public static Table readJSON(Schema schema, byte[] buffer)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。buffer
- 原始 UTF8 格式字节。public static Table readJSON(Schema schema, JSONOptions opts, byte[] buffer)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。public static Table readJSON(Schema schema, JSONOptions opts, File path)
schema
- 文件的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。path
- 要读取的本地文件。public static Table readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器public static Table readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator, int emptyRowCount)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器emptyRowCount
- 如果未读取任何列,则返回的行数。public static Table readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len, int emptyRowCount)
public static Table readJSON(Schema schema, JSONOptions opts, byte[] buffer, long offset, long len)
public static TableWithMeta readJSON(JSONOptions opts, HostMemoryBuffer buffer, long offset, long len)
opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static TableWithMeta readAndInferJSON(JSONOptions opts, DataSource ds)
opts
- 各种 JSON 解析选项。public static Table readJSON(Schema schema, JSONOptions opts, HostMemoryBuffer buffer, long offset, long len)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readJSON(Schema schema, JSONOptions opts, HostMemoryBuffer buffer, long offset, long len, int emptyRowCount)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。buffer
- 原始 UTF8 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。emptyRowCount
- 如果未找到任何列,则使用的行数。public static Table readJSON(Schema schema, JSONOptions opts, DataSource ds)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。ds
- 要从中读取的 DataSource。public static Table readJSON(Schema schema, JSONOptions opts, DataSource ds, int emptyRowCount)
schema
- 数据的 schema。您可以使用 Schema.INFERRED 来推断 schema。opts
- 各种 JSON 解析选项。ds
- 要从中读取的 DataSource。emptyRowCount
- 如果未读取任何列,则返回的行数。public static Table readParquet(File path)
path
- 要读取的本地文件。public static Table readParquet(ParquetOptions opts, File path)
opts
- 各种 Parquet 解析选项。path
- 要读取的本地文件。public static Table readParquet(byte[] buffer)
buffer
- 原始 Parquet 格式字节。public static Table readParquet(ParquetOptions opts, byte[] buffer)
opts
- 各种 Parquet 解析选项。buffer
- 原始 Parquet 格式字节。public static Table readParquet(ParquetOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
opts
- 各种 Parquet 解析选项。buffer
- 原始 Parquet 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器public static Table readParquet(ParquetOptions opts, byte[] buffer, long offset, long len)
opts
- 各种 Parquet 解析选项。buffer
- 原始 Parquet 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readParquet(ParquetOptions opts, HostMemoryBuffer buffer, long offset, long len)
opts
- 各种 Parquet 解析选项。buffer
- 原始 Parquet 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readParquet(ParquetOptions opts, HostMemoryBuffer... buffers)
opts
- 各种 Parquet 解析选项。buffers
- 包含 Parquet 数据的缓冲区。缓冲区按逻辑顺序连接起来以构建要读取的文件。public static Table readParquet(ParquetOptions opts, DataSource ds)
opts
- 各种 Parquet 解析选项。ds
- 提供 Parquet 文件数据的自定义数据源public static Table readAvro(File path)
path
- 要读取的本地文件。public static Table readAvro(AvroOptions opts, File path)
opts
- 各种 Avro 解析选项。path
- 要读取的本地文件。public static Table readAvro(byte[] buffer)
buffer
- 原始 Avro 格式字节。public static Table readAvro(AvroOptions opts, byte[] buffer)
opts
- 各种 Avro 解析选项。buffer
- 原始 Avro 格式字节。public static Table readAvro(AvroOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
opts
- 各种 Avro 解析选项。buffer
- 原始 Avro 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器public static Table readAvro(AvroOptions opts, byte[] buffer, long offset, long len)
public static Table readAvro(AvroOptions opts, HostMemoryBuffer buffer, long offset, long len)
opts
- 各种 Avro 解析选项。buffer
- 原始 Avro 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readAvro(AvroOptions opts, DataSource ds)
public static Table readORC(File path)
path
- 要读取的本地文件。public static Table readORC(ORCOptions opts, File path)
opts
- ORC 解析选项。path
- 要读取的本地文件。public static Table readORC(byte[] buffer)
buffer
- 原始 ORC 格式字节。public static Table readORC(ORCOptions opts, byte[] buffer)
opts
- 各种 ORC 解析选项。buffer
- 原始 ORC 格式字节。public static Table readORC(ORCOptions opts, byte[] buffer, long offset, long len, HostMemoryAllocator hostMemoryAllocator)
opts
- 各种 ORC 解析选项。buffer
- 原始 ORC 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。hostMemoryAllocator
- 主机内存缓冲区分配器public static Table readORC(ORCOptions opts, byte[] buffer, long offset, long len)
public static Table readORC(ORCOptions opts, HostMemoryBuffer buffer, long offset, long len)
opts
- 各种 ORC 解析选项。buffer
- 原始 ORC 格式字节。offset
- 缓冲区起始偏移量。len
- 要解析的字节数。public static Table readORC(ORCOptions opts, DataSource ds)
public static TableWriter writeParquetChunked(ParquetWriterOptions options, File outputFile)
options
- Parquet 写入器选项。outputFile
- 要写入文件的位置。public static TableWriter writeParquetChunked(ParquetWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
options
- Parquet 写入器选项。consumer
- 当主机缓冲区准备好包含 Parquet 格式数据时将被调用的类。hostMemoryAllocator
- 主机内存缓冲区分配器public static TableWriter writeParquetChunked(ParquetWriterOptions options, HostBufferConsumer consumer)
public static void writeColumnViewsToParquet(ParquetWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator, ColumnView... columnViews)
options
- Parquet 写入器选项。consumer
- 当主机缓冲区准备好包含 Parquet 格式数据时将被调用的类。hostMemoryAllocator
- 主机内存缓冲区分配器columnViews
- 要写入 Parquet 的 ColumnViewspublic static void writeColumnViewsToParquet(ParquetWriterOptions options, HostBufferConsumer consumer, ColumnView... columnViews)
public static TableWriter writeORCChunked(ORCWriterOptions options, File outputFile)
options
- ORC 写入器选项。outputFile
- 要写入文件的位置。public static TableWriter writeORCChunked(ORCWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
options
- ORC 写入器选项。consumer
- 当主机缓冲区准备好包含 ORC 格式数据时将被调用的类。hostMemoryAllocator
- 主机内存缓冲区分配器public static TableWriter writeORCChunked(ORCWriterOptions options, HostBufferConsumer consumer)
public static TableWriter writeArrowIPCChunked(ArrowIPCWriterOptions options, File outputFile)
options
- arrow IPC 写入器选项。outputFile
- 要写入文件的位置。public static TableWriter writeArrowIPCChunked(ArrowIPCWriterOptions options, HostBufferConsumer consumer, HostMemoryAllocator hostMemoryAllocator)
options
- arrow IPC 写入器选项。consumer
- 当主机缓冲区准备好包含 arrow IPC 格式数据时将被调用的类。hostMemoryAllocator
- 主机内存缓冲区分配器public static TableWriter writeArrowIPCChunked(ArrowIPCWriterOptions options, HostBufferConsumer consumer)
public static StreamedTableReader readArrowIPCChunked(ArrowIPCOptions options, File inputFile)
options
- 读取选项。inputFile
- 要读取 Arrow IPC 格式数据的文件public static StreamedTableReader readArrowIPCChunked(File inputFile)
inputFile
- 要读取 Arrow IPC 格式数据的文件public static StreamedTableReader readArrowIPCChunked(ArrowIPCOptions options, HostBufferProvider provider, HostMemoryAllocator hostMemoryAllocator)
options
- 读取选项。provider
- 提供正在读取的数据的来源。public static StreamedTableReader readArrowIPCChunked(ArrowIPCOptions options, HostBufferProvider provider)
public static StreamedTableReader readArrowIPCChunked(HostBufferProvider provider)
provider
- 提供正在读取的数据的来源。public static Table concatenate(Table... tables)
public ColumnVector interleaveColumns()
public Table repeat(int count)
count
- 重复每行的次数。public Table repeat(ColumnView counts)
counts
- 重复每行的次数。不能有 null,必须是整数类型,并且必须包含表中每一行的条目。CudfException
- 发生任何错误时。public PartitionedTable partition(ColumnView partitionMap, int numberOfPartitions)
partitionMap
- 每行的分区。numberOfPartitions
- 分区数PartitionedTable
暴露 Table
类有限功能的 Tablepublic ColumnVector lowerBound(boolean[] areNullsSmallest, Table valueTable, boolean[] descFlags)
Example: Single column: idx 0 1 2 3 4 inputTable = { 10, 20, 20, 30, 50 } valuesTable = { 20 } result = { 1 } Multi Column: idx 0 1 2 3 4 inputTable = {{ 10, 20, 20, 20, 20 }, { 5.0, .5, .5, .7, .7 }, { 90, 77, 78, 61, 61 }} valuesTable = {{ 20 }, { .7 }, { 61 }} result = { 3 }输入表和值表不能为空(行数 > 0)
areNullsSmallest
- 每列:如果假定 null 最小,则为 truevalueTable
- 要查找插入位置的值表descFlags
- 每列指示排序,如果为降序则为 true。public ColumnVector lowerBound(Table valueTable, OrderByArg... args)
valueTable
- 要查找插入位置的值表args
- 用于对此表进行排序的排序顺序。public ColumnVector upperBound(boolean[] areNullsSmallest, Table valueTable, boolean[] descFlags)
Example: Single column: idx 0 1 2 3 4 inputTable = { 10, 20, 20, 30, 50 } valuesTable = { 20 } result = { 3 } Multi Column: idx 0 1 2 3 4 inputTable = {{ 10, 20, 20, 20, 20 }, { 5.0, .5, .5, .7, .7 }, { 90, 77, 78, 61, 61 }} valuesTable = {{ 20 }, { .7 }, { 61 }} result = { 5 }输入表和值表不能为空(行数 > 0)
areNullsSmallest
- 每列:如果假定 null 最小,则为 truevalueTable
- 要查找插入位置的值表descFlags
- 每列指示排序,如果为降序则为 true。public ColumnVector upperBound(Table valueTable, OrderByArg... args)
valueTable
- 要查找插入位置的值表args
- 用于对此表进行排序的排序顺序。public Table crossJoin(Table right)
right
- 右表public ColumnVector sortOrder(OrderByArg... args)
args
- 数据按何种顺序排序。public Table orderBy(OrderByArg... args)
Table
的一部分返回的 ColumnVector
。示例用法:orderBy(true, OrderByArg.asc(0), OrderByArg.desc(3)...);
args
- 用于初始化 sortKeys 的 Suppliers。public static Table merge(Table[] tables, OrderByArg... args)
tables
- 应该合并的表。args
- 表的排序顺序。应该与它们最初排序的方式一致。public static Table merge(List<Table> tables, OrderByArg... args)
tables
- 应该合并的表。args
- 表的排序顺序。应该与它们最初排序的方式一致。public Table.GroupByOperation groupBy(GroupByOptions groupByOptions, int... indices)
groupByOptions
- 在构建器中提供的选项indices
- 要进行 groupBy 的列public Table.GroupByOperation groupBy(int... indices)
indices
- 要进行 groupBy 的列public PartitionedTable roundRobinPartition(int numberOfPartitions, int startPartition)
numberOfPartitions
- - 要使用的分区数量。startPartition
- - 起始分区索引(即:第一行放置的位置)。PartitionedTable
- 暴露 Table
类有限功能的表public Table.TableOperation onColumns(int... indices)
public Table filter(ColumnView mask)
给定一个掩码列,如果掩码中对应的元素 `i` 非 null 且为 `true`,则将输入列中的每个元素 `i` 复制到输出列中。此操作是稳定的:输入顺序得以保留。
此表和掩码列必须具有相同的行数。
输出表的大小等于 boolean_mask 中非 null 且为 `true` 的元素的数量。
如果原始表的行数为零,则没有错误,并返回一个空表。
mask
- 类型为 DType.BOOL8
的列,用作过滤输入列的掩码public Table dropDuplicates(int[] keyColumns, Table.DuplicateKeepOption keep, boolean nullsEqual)
keyColumns
- 表示当前表中键列的索引数组。keep
- 指定保留任何、第一个、最后一个或不保留找到的重复项的选项。nullsEqual
- 标志,用于指示在比较键列的行以检查唯一性时,null 是否被视为相等。public int distinctCount(NullEquality nullsEqual)
nullsEqual
- null 是否应被视为彼此相等。public int distinctCount()
public ContiguousTable[] contiguousSplit(int... indices)
示例:input: [{10, 12, 14, 16, 18, 20, 22, 24, 26, 28}, {50, 52, 54, 56, 58, 60, 62, 64, 66, 68}] splits: {2, 5, 9} output: [{{10, 12}, {14, 16, 18}, {20, 22, 24, 26}, {28}}, {{50, 52}, {54, 56, 58}, {60, 62, 64, 66}, {68}}]
indices
- 进行分割的索引向量。public ChunkedPack makeChunkedPack(long bounceBufferSize, RmmDeviceMemoryResource tempMemoryResource)
bounceBufferSize
- 将用于打包的 bounce buffer 的大小tempMemoryResource
- 用于满足临时和 thrust 临时空间分配的内存资源。public ChunkedPack makeChunkedPack(long bounceBufferSize)
bounceBufferSize
- 将用于打包的 bounce buffer 的大小public Table explode(int index)
示例:input: [[5,10,15], 100], [[20,25], 200], [[30], 300] index: 0 output: [5, 100], [10, 100], [15, 100], [20, 200], [25, 200], [30, 300]
Null 的传播方式取决于什么为 null。 input: [[5,null,15], 100], [null, 200] index: 0 output: [5, 100], [null, 100], [15, 100]
请注意,null 列表会从输出中完全删除,而列表内的 null 则被取出并保留。index
- 表内要展开的列索引。public Table explodePosition(int index)
input: [[5,10,15], 100], [[20,25], 200], [[30], 300] index: 0 output: [0, 5, 100], [1, 10, 100], [2, 15, 100], [0, 20, 200], [1, 25, 200], [0, 30, 300]
Null 和空列表的传播方式取决于它们是否为 null 或空。 input: [[5,null,15], 100], [null, 200] index: 0 output: [5, 100], [null, 100], [15, 100]
请注意,结果表中不包含 null 列表,但列表内的 null 和空列表在该行的该列中将用一个 null 条目表示。index
- 表内要展开的列索引。public Table explodeOuter(int index)
示例:input: [[5,10,15], 100], [[20,25], 200], [[30], 300], index: 0 output: [5, 100], [10, 100], [15, 100], [20, 200], [25, 200], [30, 300]
Null 的传播方式取决于什么为 null。 input: [[5,null,15], 100], [null, 200] index: 0 output: [5, 100], [null, 100], [15, 100], [null, 200]
请注意,null 列表会从输出中完全删除,而列表内的 null 则被取出并保留。index
- 表内要展开的列索引。public Table explodeOuterPosition(int index)
Example: input: [[5,10,15], 100], [[20,25], 200], [[30], 300], index: 0 output: [0, 5, 100], [1, 10, 100], [2, 15, 100], [0, 20, 200], [1, 25, 200], [0, 30, 300]
Null 和空列表在结果中作为 null 条目传播。 input: [[5,null,15], 100], [null, 200], [[], 300] index: 0 output: [0, 5, 100], [1, null, 100], [2, 15, 100], [0, null, 200], [0, null, 300]
返回index
- 表内要展开的列索引。public ColumnVector rowBitCount()
public Table gather(ColumnView gatherMap)
gatherMap
- 索引映射。必须是非 null 且为整数类型。public Table gather(ColumnView gatherMap, OutOfBoundsPolicy outOfBoundsPolicy)
gatherMap
- 索引映射。必须是非 null 且为整数类型。outOfBoundsPolicy
- `gatherMap` 中存在超出范围值时使用的策略。public Table scatter(ColumnView scatterMap, Table target)
scatterMap
- 索引映射。必须是非 null 且为整数类型。target
- 将当前表中的行分散到其中但不改变原位置的表。public static Table scatter(Scalar[] source, ColumnView scatterMap, Table target)
source
- 包含要分散到目标表中的值的输入标量。scatterMap
- 索引映射。必须是非 null 且为整数类型。target
- 将源中的值分散到其中但不改变原位置的表。public GatherMap[] leftJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic GatherMap leftDistinctJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例,可用于收集右表,并将结果与左表结合以生成左外连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic long leftJoinRowCount(HashJoin rightHash)
HashJoin
参数已从右表的键列构建。rightHash
- 从右表连接键列构建的哈希表。public GatherMap[] leftJoinGatherMaps(HashJoin rightHash)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。rightHash
- 从右表连接键列构建的哈希表。public GatherMap[] leftJoinGatherMaps(HashJoin rightHash, long outputRowCount)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 leftJoinRowCount(HashJoin)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightHash
- 从右表连接键列构建的哈希表。outputRowCount
- 连接结果中的输出行数public long conditionalLeftJoinRowCount(Table rightTable, CompiledExpression condition)
rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap[] conditionalLeftJoinGatherMaps(Table rightTable, CompiledExpression condition)
GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap[] conditionalLeftJoinGatherMaps(Table rightTable, CompiledExpression condition, long outputRowCount)
GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 conditionalLeftJoinRowCount(Table, CompiledExpression)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。outputRowCount
- 连接结果中的输出行数public static MixedJoinSize mixedLeftJoinSize(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public static GatherMap[] mixedLeftJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public static GatherMap[] mixedLeftJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality, MixedJoinSize joinSize)
GatherMap
实例,分别用于收集左表和右表以生成左连接结果。调用者负责关闭结果 gather map 实例。此接口允许在之前计算了输出大小时,传递从 mixedLeftJoinSize(Table, Table, Table, Table, CompiledExpression, NullEquality)
获得的大小结果。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。joinSize
- 混合连接大小结果。public GatherMap[] innerJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic GatherMap[] innerDistinctJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic long innerJoinRowCount(HashJoin otherHash)
otherHash
- 从另一个表连接键列构建的哈希表。public GatherMap[] innerJoinGatherMaps(HashJoin rightHash)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。rightHash
- 从右表连接键列构建的哈希表。public GatherMap[] innerJoinGatherMaps(HashJoin rightHash, long outputRowCount)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 innerJoinRowCount(HashJoin)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightHash
- 从右表连接键列构建的哈希表。outputRowCount
- 连接结果中的输出行数public long conditionalInnerJoinRowCount(Table rightTable, CompiledExpression condition)
rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap[] conditionalInnerJoinGatherMaps(Table rightTable, CompiledExpression condition)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap[] conditionalInnerJoinGatherMaps(Table rightTable, CompiledExpression condition, long outputRowCount)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 conditionalInnerJoinRowCount(Table, CompiledExpression)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。outputRowCount
- 连接结果中的输出行数public static MixedJoinSize mixedInnerJoinSize(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public static GatherMap[] mixedInnerJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public static GatherMap[] mixedInnerJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality, MixedJoinSize joinSize)
GatherMap
实例,分别用于收集左表和右表以生成内连接结果。调用者负责关闭结果 gather map 实例。此接口允许在之前计算了输出大小时,传递从 mixedInnerJoinSize(Table, Table, Table, Table, CompiledExpression, NullEquality)
获得的大小结果。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。joinSize
- 混合连接大小结果。public GatherMap[] fullJoinGatherMaps(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例,分别用于收集左表和右表以生成完全连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic long fullJoinRowCount(HashJoin rightHash)
HashJoin
参数已从右表的键列构建。请注意,与 leftJoinRowCount(HashJoin)
和 #innerJoinRowCount(HashJoin) 不同,此方法与 {@link #fullJoinGatherMaps(HashJoin, long)} 相比会执行一些冗余计算。rightHash
- 从右表连接键列构建的哈希表。public GatherMap[] fullJoinGatherMaps(HashJoin rightHash)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成完全连接结果。调用者负责关闭结果 gather map 实例。rightHash
- 从右表连接键列构建的哈希表。public GatherMap[] fullJoinGatherMaps(HashJoin rightHash, long outputRowCount)
HashJoin
参数已从右表的键列构建。将返回两个 GatherMap
实例,分别用于收集左表和右表以生成完全连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 fullJoinRowCount(HashJoin)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightHash
- 从右表连接键列构建的哈希表。outputRowCount
- 连接结果中的输出行数public GatherMap[] conditionalFullJoinGatherMaps(Table rightTable, CompiledExpression condition)
GatherMap
实例,分别用于收集左表和右表以生成完全连接结果。调用者负责关闭结果 gather map 实例。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。public static GatherMap[] mixedFullJoinGatherMaps(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
GatherMap
实例,分别用于收集左表和右表以生成完全连接结果。调用者负责关闭结果 gather map 实例。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public GatherMap leftSemiJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例可用于收集左表以生成左半连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic long conditionalLeftSemiJoinRowCount(Table rightTable, CompiledExpression condition)
rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap conditionalLeftSemiJoinGatherMap(Table rightTable, CompiledExpression condition)
GatherMap
实例可用于收集左表以生成左半连接结果。调用者负责关闭结果 gather map 实例。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap conditionalLeftSemiJoinGatherMap(Table rightTable, CompiledExpression condition, long outputRowCount)
GatherMap
实例可用于收集左表以生成左半连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 conditionalLeftSemiJoinRowCount(Table, CompiledExpression)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。outputRowCount
- 连接结果中的输出行数public static GatherMap mixedLeftSemiJoinGatherMap(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
GatherMap
实例,可用于收集左表以生成左半连接结果。调用者负责关闭结果 gather map 实例。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public GatherMap leftAntiJoinGatherMap(Table rightKeys, boolean compareNullsEqual)
GatherMap
实例可用于收集左表以生成左反连接结果。调用者负责关闭结果 gather map 实例。rightKeys
- 右表的连接键列compareNullsEqual
- 如果 null 键值应匹配则为 true,否则为 falsepublic long conditionalLeftAntiJoinRowCount(Table rightTable, CompiledExpression condition)
rightTable
- 连接中的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap conditionalLeftAntiJoinGatherMap(Table rightTable, CompiledExpression condition)
GatherMap
实例可用于收集左表以生成左反连接结果。调用者负责关闭结果 gather map 实例。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。public GatherMap conditionalLeftAntiJoinGatherMap(Table rightTable, CompiledExpression condition, long outputRowCount)
GatherMap
实例可用于收集左表以生成左反连接结果。调用者负责关闭结果 gather map 实例。此接口允许传递先前从 conditionalLeftAntiJoinRowCount(Table, CompiledExpression)
计算的输出行数。警告:传递小于实际行数的行数将导致未定义的行为。rightTable
- 连接的右侧表。condition
- 连接期间要评估的条件表达式。outputRowCount
- 连接结果中的输出行数public static GatherMap mixedLeftAntiJoinGatherMap(Table leftKeys, Table rightKeys, Table leftConditional, Table rightConditional, CompiledExpression condition, NullEquality nullEquality)
GatherMap
实例,可用于收集左表以生成左反连接结果。调用者负责关闭结果 gather map 实例。leftKeys
- 左表中用于等值条件的键列。rightKeys
- 右表中用于等值条件的键列。leftConditional
- 左表中评估非等值条件所需的列。rightConditional
- 右表中评估非等值条件所需的列。condition
- 连接的非等值条件。nullEquality
- null 是否应被视为相等进行比较。public static Table fromPackedTable(ByteBuffer metadata, DeviceMemoryBuffer data)
metadata
- 表的主机端元数据。data
- 表的 GPU 数据缓冲区。public Table sample(long n, boolean replacement, long seed)
n
- 预期从表中获取的非负样本数。replacement
- 允许或禁止多次采样同一行。seed
- 用于初始化随机数生成器的种子值。Copyright © 2025. 保留所有权利。