| Package | Description |
|---|---|
| ai.rapids.cudf |
| Modifier and Type | Class and Description |
|---|---|
class |
ColumnVector
This class represents the immutable vector of data.
|
| Modifier and Type | Method and Description |
|---|---|
ColumnView |
ColumnView.bitCastTo(DType type)
Zero-copy cast between types with the same underlying length.
|
static ColumnView |
ColumnView.fromDeviceBuffer(BaseDeviceMemoryBuffer buffer,
long startOffset,
DType type,
int rows)
Create a new column view from a raw device buffer.
|
ColumnView |
ColumnView.getChildColumnView(int childIndex)
Returns the child column view at a given index.
|
ColumnView[] |
ColumnView.getChildColumnViews()
Returns the child column views for this view
Please note that it is the responsibility of the caller to close these views.
|
ColumnView[] |
Scalar.getChildrenFromStructScalar()
Fetches views of children columns from struct scalar.
|
ColumnView |
Scalar.getListAsColumnView()
Returns the scalar value as a ColumnView.
|
ColumnView |
ColumnView.logicalCastTo(DType type)
Deprecated.
this has changed to bit_cast in C++ so use that name instead
|
static ColumnView |
ColumnView.makeStructView(ColumnView... columns)
Create a new struct column view of existing column views.
|
static ColumnView |
ColumnView.makeStructView(long rows,
ColumnView... columns)
Create a new struct column view of existing column views.
|
ColumnView |
ColumnView.replaceChildrenWithViews(int[] indices,
ColumnView[] views)
This method takes in a nested type and replaces its children with the given views
Note: Make sure the numbers of rows in the leaf node are the same as the child replacing it
otherwise the list can point to elements outside of the column values.
|
ColumnView |
ColumnView.replaceListChild(ColumnView child)
This method takes in a list and returns a new list with the leaf node replaced with the given
view.
|
ColumnView[] |
ColumnView.splitAsViews(int... indices)
Splits a ColumnView (including null values) into a set of ColumnViews
according to a set of indices.
|
ColumnView |
GatherMap.toColumnView(long startRow,
int numRows)
Create a column view that can be used to perform a gather operation.
|
| Modifier and Type | Method and Description |
|---|---|
ColumnVector |
ColumnView.addCalendricalMonths(ColumnView months)
Add the specified number of months to the timestamp.
|
static ColumnVector |
ColumnVector.concatenate(ColumnView... columns)
Create a new vector by concatenating multiple columns together.
|
ColumnVector |
ColumnView.contains(ColumnView needles)
Returns a new ColumnVector of
DType.BOOL8 elements containing true if the corresponding
entry in haystack is contained in needles and false if it is not. |
static Table |
Table.convertFromRows(ColumnView vec,
DType... schema)
Convert a column of list of bytes that is formatted like the output from `convertToRows`
and convert it back to a table.
|
static Table |
Table.convertFromRowsFixedWidthOptimized(ColumnView vec,
DType... schema)
Convert a column of list of bytes that is formatted like the output from `convertToRows`
and convert it back to a table.
|
ColumnVector |
ColumnView.copyWithBooleanColumnAsValidity(ColumnView boolColumn)
Creates a deep copy of a column while replacing the validity mask.
|
Table |
Table.filter(ColumnView mask)
Filters this table using a column of boolean values as a mask, returning a new one.
|
ColumnVector |
ColumnView.findAndReplaceAll(ColumnView oldValues,
ColumnView newValues)
Returns a vector with all values "oldValues[i]" replaced with "newValues[i]".
|
Table |
Table.gather(ColumnView gatherMap)
Gathers the rows of this table according to `gatherMap` such that row "i"
in the resulting table's columns will contain row "gatherMap[i]" from this table.
|
Table |
Table.gather(ColumnView gatherMap,
OutOfBoundsPolicy outOfBoundsPolicy)
Gathers the rows of this table according to `gatherMap` such that row "i"
in the resulting table's columns will contain row "gatherMap[i]" from this table.
|
ColumnVector |
ColumnView.ifElse(ColumnView trueValues,
ColumnView falseValues)
For a BOOL8 vector, computes a vector whose rows are selected from two other vectors
based on the boolean value of this vector in the corresponding row.
|
ColumnVector |
ColumnView.ifElse(ColumnView trueValues,
Scalar falseValue)
For a BOOL8 vector, computes a vector whose rows are selected from two other inputs
based on the boolean value of this vector in the corresponding row.
|
ColumnVector |
ColumnView.ifElse(Scalar trueValue,
ColumnView falseValues)
For a BOOL8 vector, computes a vector whose rows are selected from two other inputs
based on the boolean value of this vector in the corresponding row.
|
static ColumnVector |
ColumnVector.listConcatenateByRow(boolean ignoreNull,
ColumnView... columns)
Concatenate columns of lists horizontally (row by row), combining a corresponding row
from each column into a single list row of a new column.
|
static ColumnVector |
ColumnVector.listConcatenateByRow(ColumnView... columns)
Concatenate columns of lists horizontally (row by row), combining a corresponding row
from each column into a single list row of a new column.
|
ColumnVector |
ColumnView.listContainsColumn(ColumnView key)
Create a column of bool values indicating whether the list rows of the first
column contain the corresponding values in the second column.
|
static Scalar |
Scalar.listFromColumnView(ColumnView list)
Creates a scalar of list from a ColumnView.
|
ColumnVector |
ColumnView.listIndexOf(ColumnView keys,
ColumnView.FindOptions findOption)
Create a column of int32 indices, indicating the position of each row in the
search key column in the corresponding row of the lists column.
|
static ColumnVector |
ColumnVector.makeList(ColumnView... columns)
Create a LIST column from the given columns.
|
static ColumnVector |
ColumnVector.makeList(long rows,
DType type,
ColumnView... columns)
Create a LIST column from the given columns.
|
ColumnVector |
ColumnVector.makeListFromOffsets(long rows,
ColumnView offsets)
Create a LIST column from the current column and a given offsets column.
|
static ColumnVector |
ColumnVector.makeStruct(ColumnView... columns)
Create a new struct vector made up of existing columns.
|
static ColumnVector |
ColumnVector.makeStruct(long rows,
ColumnView... columns)
Create a new struct vector made up of existing columns.
|
static ColumnView |
ColumnView.makeStructView(ColumnView... columns)
Create a new struct column view of existing column views.
|
static ColumnView |
ColumnView.makeStructView(long rows,
ColumnView... columns)
Create a new struct column view of existing column views.
|
static ColumnVector |
ColumnVector.md5Hash(ColumnView... columns)
Create a new vector containing the MD5 hash of each row in the table.
|
ColumnVector |
ColumnView.mergeAndSetValidity(BinaryOp mergeOp,
ColumnView... columns)
Create a deep copy of the column while replacing the null mask.
|
PartitionedTable |
Table.partition(ColumnView partitionMap,
int numberOfPartitions)
Partition this table using the mapping in partitionMap.
|
Table |
Table.repeat(ColumnView counts)
Create a new table by repeating each row of this table.
|
Table |
Table.repeat(ColumnView counts,
boolean checkCount)
Create a new table by repeating each row of this table.
|
ColumnVector |
ColumnView.repeatStrings(ColumnView repeatTimes)
Given a strings column, an output strings column is generated by repeating each of the input
string by a number of times given by the corresponding row in a
repeatTimes
numeric column. |
ColumnVector |
ColumnView.repeatStrings(ColumnView repeatTimes,
ColumnView outputStringSizes)
This function is an overloaded version of
repeatStrings,
with an additional parameter outputStringSizes that provides a column containing
the pre-computed sizes of the output strings. |
ColumnView.StringSizes |
ColumnView.repeatStringsSizes(ColumnView repeatTimes)
Compute sizes of the output strings if each string in an input strings column is repeated by
a different number of times given by the corresponding row in a
repeatTimes
numeric column (i.e., compute sizes of the strings resulted from
repeatStringsWithColumnRepeatTimes(long, long, long)). |
ColumnView |
ColumnView.replaceChildrenWithViews(int[] indices,
ColumnView[] views)
This method takes in a nested type and replaces its children with the given views
Note: Make sure the numbers of rows in the leaf node are the same as the child replacing it
otherwise the list can point to elements outside of the column values.
|
ColumnView |
ColumnView.replaceListChild(ColumnView child)
This method takes in a list and returns a new list with the leaf node replaced with the given
view.
|
ColumnVector |
ColumnView.replaceMultiRegex(String[] patterns,
ColumnView repls)
For each string, replaces any character sequence matching any of the regular expression
patterns with the corresponding replacement strings.
|
ColumnVector |
ColumnView.replaceNulls(ColumnView replacements)
Returns a ColumnVector with any null values replaced with the corresponding row in the
specified replacement column.
|
Table |
Table.scatter(ColumnView scatterMap,
Table target,
boolean checkBounds)
Scatters values from the source table into the target table out-of-place, returning a new
result table.
|
static Table |
Table.scatter(Scalar[] source,
ColumnView scatterMap,
Table target,
boolean checkBounds)
Scatters values from the source rows into the target table out-of-place, returning a new result
table.
|
static ColumnVector |
ColumnVector.sequence(ColumnView start,
ColumnView size)
Create a list column in which each row is a sequence of values starting from a `start` value,
incrementing by one, and its cardinality is specified by a `size` value.
|
static ColumnVector |
ColumnVector.sequence(ColumnView start,
ColumnView size,
ColumnView step)
Create a list column in which each row is a sequence of values starting from a `start` value,
incrementing by a `step` value, and its cardinality is specified by a `size` value.
|
static ColumnVector |
ColumnVector.serial32BitMurmurHash3(ColumnView[] columns)
Create a new vector containing the murmur3 hash of each row in the table, seed defaulted to 0.
|
static ColumnVector |
ColumnVector.serial32BitMurmurHash3(int seed,
ColumnView[] columns)
Create a new vector containing the murmur3 hash of each row in the table.
|
static ColumnVector |
ColumnVector.spark32BitMurmurHash3(ColumnView[] columns)
Create a new vector containing spark's 32-bit murmur3 hash of each row in the table with the
seed set to 0.
|
static ColumnVector |
ColumnVector.spark32BitMurmurHash3(int seed,
ColumnView[] columns)
Create a new vector containing spark's 32-bit murmur3 hash of each row in the table.
|
static ColumnVector |
ColumnVector.stringConcatenate(ColumnView[] columns)
Concatenate columns of strings together, combining a corresponding row from each column
into a single string row of a new column with no separator string inserted between each
combined string and maintaining null values in combined rows.
|
static ColumnVector |
ColumnVector.stringConcatenate(ColumnView[] columns,
ColumnView sepCol)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
ColumnVector.stringConcatenate(ColumnView[] columns,
ColumnView sepCol)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
ColumnVector.stringConcatenate(ColumnView[] columns,
ColumnView sepCol,
Scalar separatorNarep,
Scalar colNarep,
boolean separateNulls)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
ColumnVector.stringConcatenate(ColumnView[] columns,
ColumnView sepCol,
Scalar separatorNarep,
Scalar colNarep,
boolean separateNulls)
Concatenate columns of strings together using a separator specified for each row
and returns the result as a string column.
|
static ColumnVector |
ColumnVector.stringConcatenate(Scalar separator,
Scalar narep,
ColumnView[] columns)
Concatenate columns of strings together, combining a corresponding row from each column into
a single string row of a new column.
|
static ColumnVector |
ColumnVector.stringConcatenate(Scalar separator,
Scalar narep,
ColumnView[] columns,
boolean separateNulls)
Concatenate columns of strings together, combining a corresponding row from each column into
a single string row of a new column.
|
ColumnVector |
ColumnView.stringConcatenateListElements(ColumnView sepCol)
Given a lists column of strings (each row is a list of strings), concatenates the strings
within each row and returns a single strings column result.
|
ColumnVector |
ColumnView.stringConcatenateListElements(ColumnView sepCol,
Scalar separatorNarep,
Scalar stringNarep,
boolean separateNulls,
boolean emptyStringOutputIfEmptyList)
Given a lists column of strings (each row is a list of strings), concatenates the strings
within each row and returns a single strings column result.
|
static Scalar |
Scalar.structFromColumnViews(ColumnView... columns)
Creates a scalar of struct from a ColumnView.
|
ColumnVector |
ColumnView.substring(ColumnView start,
ColumnView end)
Returns a new strings column that contains substrings of the strings in the provided column
which uses unique ranges for each string
|
static void |
Table.writeColumnViewsToParquet(ParquetWriterOptions options,
HostBufferConsumer consumer,
ColumnView... columnViews)
This is an evolving API and most likely be removed in future releases.
|
| Constructor and Description |
|---|
ColumnView(DType type,
long rows,
Optional<Long> nullCount,
BaseDeviceMemoryBuffer validityBuffer,
BaseDeviceMemoryBuffer offsetBuffer,
ColumnView[] children)
Create a new column view based off of data already on the device.
|
Copyright © 2022. All rights reserved.