diff --git a/java/ci/README.md b/java/ci/README.md
index 0e947b62511..f022bec04e3 100644
--- a/java/ci/README.md
+++ b/java/ci/README.md
@@ -34,7 +34,7 @@ nvidia-docker run -it cudf-build:11.5.0-devel-centos7 bash
You can download the cuDF repo in the docker container or you can mount it into the container.
Here I choose to download again in the container.
```bash
-git clone --recursive https://github.com/rapidsai/cudf.git -b branch-22.02
+git clone --recursive https://github.com/rapidsai/cudf.git -b branch-22.04
```
### Build cuDF jar with devtoolset
@@ -47,5 +47,5 @@ scl enable devtoolset-9 "java/ci/build-in-docker.sh"
### The output
-You can find the cuDF jar in java/target/ like cudf-22.02.0-SNAPSHOT-cuda11.jar.
+You can find the cuDF jar in java/target/ like cudf-22.04.0-SNAPSHOT-cuda11.jar.
diff --git a/java/pom.xml b/java/pom.xml
index ec6968ca761..8f0fb1000d8 100755
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -21,7 +21,7 @@
ai.rapids
cudf
- 22.02.0-SNAPSHOT
+ 22.04.0-SNAPSHOT
cudfjni
diff --git a/java/src/main/java/ai/rapids/cudf/HostColumnVector.java b/java/src/main/java/ai/rapids/cudf/HostColumnVector.java
index 69371aa62c0..18973b25abe 100644
--- a/java/src/main/java/ai/rapids/cudf/HostColumnVector.java
+++ b/java/src/main/java/ai/rapids/cudf/HostColumnVector.java
@@ -1215,6 +1215,8 @@ private void appendChildOrNull(ColumnBuilder childBuilder, Object listElement) {
childBuilder.append((Short) listElement);
} else if (listElement instanceof BigDecimal) {
childBuilder.append((BigDecimal) listElement);
+ } else if (listElement instanceof BigInteger) {
+ childBuilder.append((BigInteger) listElement);
} else if (listElement instanceof List) {
childBuilder.append((List>) listElement);
} else if (listElement instanceof StructData) {
@@ -1296,17 +1298,20 @@ public final ColumnBuilder append(boolean value) {
return this;
}
- public final ColumnBuilder append(BigDecimal value) {
- growFixedWidthBuffersAndRows();
+ public ColumnBuilder append(BigDecimal value) {
+ return append(value.setScale(-type.getScale(), RoundingMode.UNNECESSARY).unscaledValue());
+ }
+
+ public ColumnBuilder append(BigInteger unscaledVal) {
+ growBuffersAndRows(false, currentIndex * type.getSizeInBytes() + type.getSizeInBytes());
assert currentIndex < rows;
- // Rescale input decimal with UNNECESSARY policy, which accepts no precision loss.
- BigInteger unscaledVal = value.setScale(-type.getScale(), RoundingMode.UNNECESSARY).unscaledValue();
if (type.typeId == DType.DTypeEnum.DECIMAL32) {
data.setInt(currentIndex++ << bitShiftBySize, unscaledVal.intValueExact());
} else if (type.typeId == DType.DTypeEnum.DECIMAL64) {
data.setLong(currentIndex++ << bitShiftBySize, unscaledVal.longValueExact());
} else if (type.typeId == DType.DTypeEnum.DECIMAL128) {
- byte[] unscaledValueBytes = value.unscaledValue().toByteArray();
+ assert currentIndex < rows;
+ byte[] unscaledValueBytes = unscaledVal.toByteArray();
byte[] result = convertDecimal128FromJavaToCudf(unscaledValueBytes);
data.setBytes(currentIndex++ << bitShiftBySize, result, 0, result.length);
} else {