Package ai.rapids.cudf
Class HostColumnVector.Builder
java.lang.Object
ai.rapids.cudf.HostColumnVector.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- HostColumnVector
-
Method Summary
Modifier and TypeMethodDescriptionfinal HostColumnVector.Builder
append
(boolean value) final HostColumnVector.Builder
append
(byte value) final HostColumnVector.Builder
append
(byte value, long count) final HostColumnVector.Builder
append
(double value) final HostColumnVector.Builder
append
(float value) final HostColumnVector.Builder
append
(int value) final HostColumnVector.Builder
append
(long value) final HostColumnVector.Builder
append
(short value) final HostColumnVector.Builder
append
(HostColumnVector columnVector) Append this vector to the end of this vectorfinal HostColumnVector.Builder
append
(BigDecimal value) Append java.math.BigDecimal into HostColumnVector with UNNECESSARY RoundingMode.final HostColumnVector.Builder
append
(BigDecimal value, RoundingMode roundingMode) Append java.math.BigDecimal into HostColumnVector with user-defined RoundingMode.appendArray
(byte... values) appendArray
(double... values) appendArray
(float... values) appendArray
(int... values) appendArray
(long... values) appendArray
(short... values) final HostColumnVector.Builder
appendBoxed
(Boolean... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Byte... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Double... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Float... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Integer... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Long... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(Short... values) Append multiple values.final HostColumnVector.Builder
appendBoxed
(String... values) Append multiple values.appendBoxed
(BigDecimal... values) Append multiple values.final HostColumnVector.Builder
Append null value.final HostColumnVector.Builder
appendUnscaledDecimal
(int value) final HostColumnVector.Builder
appendUnscaledDecimal
(long value) final HostColumnVector.Builder
appendUnscaledDecimal
(BigInteger value) appendUnscaledDecimalArray
(int... values) appendUnscaledDecimalArray
(long... values) appendUTF8String
(byte[] value) appendUTF8String
(byte[] value, int offset, int length) final HostColumnVector
build()
Finish and create the immutable CudfColumn.final ColumnVector
Finish and create the immutable ColumnVector, copied to the device.final void
close()
Close this builder and free memory if the CudfColumn wasn't generated.final HostColumnVector.Builder
setNullAt
(long index) Set a specific index to null.toString()
-
Method Details
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
Append java.math.BigDecimal into HostColumnVector with UNNECESSARY RoundingMode. Input decimal should have a larger scale than column vector.Otherwise, an ArithmeticException will be thrown while rescaling. If unscaledValue after rescaling exceeds the max precision of rapids type, an ArithmeticException will be thrown while extracting integral.- Parameters:
value
- BigDecimal value to be appended
-
append
Append java.math.BigDecimal into HostColumnVector with user-defined RoundingMode. Input decimal will be rescaled according to scale of column type and RoundingMode before appended. If unscaledValue after rescaling exceeds the max precision of rapids type, an ArithmeticException will be thrown.- Parameters:
value
- BigDecimal value to be appendedroundingMode
- rounding mode determines rescaling behavior
-
appendUnscaledDecimal
-
appendUnscaledDecimal
-
appendUnscaledDecimal
-
append
-
appendUTF8String
-
appendUTF8String
-
appendArray
-
appendArray
-
appendArray
-
appendArray
-
appendArray
-
appendArray
-
appendUnscaledDecimalArray
-
appendUnscaledDecimalArray
-
appendBoxed
Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
public final HostColumnVector.Builder appendBoxed(Boolean... values) throws IndexOutOfBoundsException Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
public final HostColumnVector.Builder appendBoxed(Integer... values) throws IndexOutOfBoundsException Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
public final HostColumnVector.Builder appendBoxed(Double... values) throws IndexOutOfBoundsException Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
appendBoxed
public final HostColumnVector.Builder appendBoxed(String... values) throws IndexOutOfBoundsException Append multiple values. This is very slow and should really only be used for tests.- Parameters:
values
- the values to append, including nulls.- Returns:
- this for chaining.
- Throws:
IndexOutOfBoundsException
-
append
Append this vector to the end of this vector- Parameters:
columnVector
- - Vector to be added- Returns:
- - The CudfColumn based on this builder values
-
appendNull
Append null value. -
setNullAt
Set a specific index to null.- Parameters:
index
-
-
build
Finish and create the immutable CudfColumn. -
buildAndPutOnDevice
Finish and create the immutable ColumnVector, copied to the device. -
close
public final void close()Close this builder and free memory if the CudfColumn wasn't generated. Verifies that the data was released even in the case of an error.- Specified by:
close
in interfaceAutoCloseable
-
toString
-