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.getListOffsetsView()
Get a ColumnView that is the offsets for this list.
|
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.
|
ColumnVector |
ColumnView.applyBooleanMask(ColumnView booleanMaskView)
Filters elements in each row of this LIST column using `booleanMaskView`
LIST of booleans as a mask.
|
static void |
AssertEmptyNulls.assertNullsAreEmpty(ColumnView cv) |
static ColumnVector |
ColumnVector.concatenate(ColumnView... columns)
Create a new vector by concatenating multiple columns together.
|
ColumnVector |
ColumnView.contains(ColumnView searchSpace)
Returns a new column of
DType.BOOL8 elements having the same size as this column,
each row value is true if the corresponding entry in this column is contained in the
given searchSpace column and false if it is not. |
void |
TableDebug.debug(String name,
ColumnView col)
Print the contents of a column.
|
static ColumnVector |
Aggregation128Utils.extractInt32Chunk(ColumnView col,
DType outType,
int chunkIdx)
Extract a 32-bit chunk from a 128-bit value.
|
ColumnVector |
ColumnView.extractListElement(ColumnView indices)
For each list in this column pull out the entry at the corresponding index specified in
the index column.
|
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.getMapKeyExistence(ColumnView keys)
For a column of type List
|
ColumnVector |
ColumnView.getMapValue(ColumnView keys)
Given a column of type List
|
static ColumnVector |
DecimalUtils.greaterThan(ColumnView lhs,
BigDecimal rhs)
Because the native greaterThan operator has issues with comparing decimal values that have different
precision and scale accurately.
|
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 |
DecimalUtils.lessThan(ColumnView lhs,
BigDecimal rhs)
Because the native lessThan operator has issues with comparing decimal values that have different
precision and scale accurately.
|
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 |
ColumnView.listsDifferenceDistinct(ColumnView lhs,
ColumnView rhs)
Find the difference of lists of the left column against lists of the right column.
|
static ColumnVector |
ColumnView.listsHaveOverlap(ColumnView lhs,
ColumnView rhs)
For each pair of lists from the input lists columns, check if they have any common non-null
elements.
|
static ColumnVector |
ColumnView.listsIntersectDistinct(ColumnView lhs,
ColumnView rhs)
Find the intersection without duplicate between lists at each row of the given lists columns.
|
static ColumnVector |
ColumnView.listsUnionDistinct(ColumnView lhs,
ColumnView rhs)
Find the union without duplicate between lists at each row of the given lists columns.
|
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.
|
static ColumnVector |
DecimalUtils.outOfBounds(ColumnView input,
int precision,
int scale)
With precision and scale, checks each value of input decimal column for out of bound.
|
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.
|
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. |
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)
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)
Scatters values from the source rows into the target table out-of-place, returning a new result
table.
|
ColumnVector |
ColumnView.segmentedGather(ColumnView gatherMap)
Segmented gather of the elements within a list element in each row of a list column.
|
ColumnVector |
ColumnView.segmentedGather(ColumnView gatherMap,
OutOfBoundsPolicy policy)
Segmented gather of the elements within a list element in each row of a list column.
|
ColumnVector |
ColumnView.segmentedReduce(ColumnView offsets,
SegmentedReductionAggregation aggregation)
Do a segmented reduce where the offsets column indicates which groups in this to combine.
|
ColumnVector |
ColumnView.segmentedReduce(ColumnView offsets,
SegmentedReductionAggregation aggregation,
DType outType)
Do a segmented reduce where the offsets column indicates which groups in this to combine.
|
ColumnVector |
ColumnView.segmentedReduce(ColumnView offsets,
SegmentedReductionAggregation aggregation,
NullPolicy nullPolicy,
DType outType)
Do a segmented reduce where the offsets column indicates which groups in this to combine.
|
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.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.
|
ColumnVector |
ColumnView.stringReplace(ColumnView targets,
ColumnView repls)
Returns a new strings column where target strings with each string are replaced with
corresponding replacement strings.
|
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) |
static void |
Table.writeColumnViewsToParquet(ParquetWriterOptions options,
HostBufferConsumer consumer,
HostMemoryAllocator hostMemoryAllocator,
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 © 2024. All rights reserved.