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.Builderappend(boolean value) final HostColumnVector.Builderappend(byte value) final HostColumnVector.Builderappend(byte value, long count) final HostColumnVector.Builderappend(double value) final HostColumnVector.Builderappend(float value) final HostColumnVector.Builderappend(int value) final HostColumnVector.Builderappend(long value) final HostColumnVector.Builderappend(short value) final HostColumnVector.Builderappend(HostColumnVector columnVector) Append this vector to the end of this vectorfinal HostColumnVector.Builderappend(BigDecimal value) Append java.math.BigDecimal into HostColumnVector with UNNECESSARY RoundingMode.final HostColumnVector.Builderappend(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.BuilderappendBoxed(Boolean... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Byte... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Double... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Float... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Integer... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Long... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(Short... values) Append multiple values.final HostColumnVector.BuilderappendBoxed(String... values) Append multiple values.appendBoxed(BigDecimal... values) Append multiple values.final HostColumnVector.BuilderAppend null value.final HostColumnVector.BuilderappendUnscaledDecimal(int value) final HostColumnVector.BuilderappendUnscaledDecimal(long value) final HostColumnVector.BuilderappendUnscaledDecimal(BigInteger value) appendUnscaledDecimalArray(int... values) appendUnscaledDecimalArray(long... values) appendUTF8String(byte[] value) appendUTF8String(byte[] value, int offset, int length) final HostColumnVectorbuild()Finish and create the immutable CudfColumn.final ColumnVectorFinish and create the immutable ColumnVector, copied to the device.final voidclose()Close this builder and free memory if the CudfColumn wasn't generated.final HostColumnVector.BuildersetNullAt(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:
closein interfaceAutoCloseable
-
toString
-