[FEA] Create Java string scalar from byte array #8233
Labels
feature request
New feature or request
Java
Affects Java cuDF API.
Spark
Functionality that helps Spark RAPIDS
Is your feature request related to a problem? Please describe.
In Spark, strings are tracked with a
UTF8String
which is essentially a wrapper around a byte array. The JavaScalar
only allows creating string scalars by passing a JavaString
, and creating that from a byte array requires copying the bytes to a String. InternallyScalar.fromString
copies theString
data to a byte array so it can be copied to the GPU.Therefore when converting a Spark
UTF8String
into aScalar
there's two extra copies that are created that should be avoidable.Describe the solution you'd like
Scalar
should have afromBytesAsString
method that can take a byte array and convert it into a GPU string scalar.The text was updated successfully, but these errors were encountered: