Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Dec 30, 2024
1 parent b948edf commit 08ca30a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1085,14 +1085,15 @@ public void runTest(final TestNullMode nullMode, final TestArrayMode arrayMode)

// DH will unwrap the view, so to validate the data vector we need to unwrap it as well
try (final ListViewVector newView =
(ListViewVector) schema.getFields().get(0).createVector(allocator)) {
(ListViewVector) schema.getFields().get(0).createVector(allocator)) {
newView.setValueCount(source.getRowCount());
final ListViewVector sourceArr = (ListViewVector) source.getVector(0);
int totalLen = 0;
for (int ii = 0; ii < source.getRowCount(); ++ii) {
if (!sourceArr.isNull(ii)) {
// TODO: when https://github.com/apache/arrow-java/issues/470 is fixed, use
// totalLen += sourceArr.getElementEndIndex(ii) - sourceArr.getElementStartIndex(ii);
// totalLen += sourceArr.getElementEndIndex(ii) -
// sourceArr.getElementStartIndex(ii);
totalLen += sourceArr.getObject(ii).size();
}
}
Expand All @@ -1117,13 +1118,14 @@ public void runTest(final TestNullMode nullMode, final TestArrayMode arrayMode)
} else {
// any null values will not be sent back, so we need to filter the source to match
try (final BaseListVector newView =
(BaseListVector) schema.getFields().get(0).createVector(allocator)) {
(BaseListVector) schema.getFields().get(0).createVector(allocator)) {
newView.setValueCount(source.getRowCount());
final BaseListVector sourceArr = (BaseListVector) source.getVector(0);
int totalLen = 0;
for (int ii = 0; ii < source.getRowCount(); ++ii) {
if (!sourceArr.isNull(ii)) {
totalLen += sourceArr.getElementEndIndex(ii) - sourceArr.getElementStartIndex(ii);
totalLen +=
sourceArr.getElementEndIndex(ii) - sourceArr.getElementStartIndex(ii);
}
}
Assert.geqZero(totalLen, "totalLen");
Expand Down Expand Up @@ -1360,7 +1362,7 @@ public int initializeRoot(@NotNull final BitVector source) {

@Override
public void validate(final TestNullMode nullMode, @NotNull final BitVector source,
@NotNull final BitVector dest) {
@NotNull final BitVector dest) {
for (int ii = 0; ii < source.getValueCount(); ++ii) {
if (source.isNull(ii)) {
assertTrue(dest.getValueCount() <= ii || dest.isNull(ii));
Expand Down

0 comments on commit 08ca30a

Please sign in to comment.