Skip to content

Commit

Permalink
Run spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
lriggs committed Sep 5, 2024
1 parent 0946650 commit d2d10f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions java/algorithm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ under the License.
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-format</artifactId>
<artifactId>arrow-format</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;


import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down Expand Up @@ -739,10 +738,12 @@ public void testPromoteLargeVarBinaryHelpersDirect() throws Exception {

@Test
public void testPromoteToUnionFromDecimal() throws Exception {
try (final NonNullableStructVector container = NonNullableStructVector.empty(EMPTY_SCHEMA_PATH, allocator);
final DecimalVector v = container.addOrGet("dec",
FieldType.nullable(new ArrowType.Decimal(38, 1, 128)), DecimalVector.class);
final PromotableWriter writer = new PromotableWriter(v, container)) {
try (final NonNullableStructVector container =
NonNullableStructVector.empty(EMPTY_SCHEMA_PATH, allocator);
final DecimalVector v =
container.addOrGet(
"dec", FieldType.nullable(new ArrowType.Decimal(38, 1, 128)), DecimalVector.class);
final PromotableWriter writer = new PromotableWriter(v, container)) {

container.allocateNew();
container.setValueCount(1);
Expand All @@ -762,8 +763,10 @@ public void testPromoteToUnionFromDecimal() throws Exception {
holder.reader.read(decimalHolder);

assertEquals(1, decimalHolder.isSet);
assertEquals(new BigDecimal("0.1"),
DecimalUtility.getBigDecimalFromArrowBuf(decimalHolder.buffer, 0, decimalHolder.scale, 128));
assertEquals(
new BigDecimal("0.1"),
DecimalUtility.getBigDecimalFromArrowBuf(
decimalHolder.buffer, 0, decimalHolder.scale, 128));

unionVector.get(1, holder);
NullableIntHolder intHolder = new NullableIntHolder();
Expand Down

0 comments on commit d2d10f8

Please sign in to comment.