Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
[NSE-81] add missing setNulls methods in ArrowWritableColumnVector (#79)
Browse files Browse the repository at this point in the history
* add missing setNulls methods in ArrowWritableColumnVector

* miss a @OverRide
  • Loading branch information
offthewall123 authored Feb 4, 2021
1 parent faeebb2 commit 7d8f210
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,13 @@ final void setNull(int rowId) {
writer.setNull(rowId);
}

@Override
final void setNulls(int rowId, int count) {
for (int i = 0; i < count; i++) {
writer.setNull(rowId + i);
}
}

@Override
final void setBytes(int rowId, int count, byte[] src, int srcIndex) {
writer.setSafe(rowId, src, srcIndex, count);
Expand All @@ -1718,6 +1725,13 @@ private static class BinaryWriter extends ArrowVectorWriter {
final void setNull(int rowId) {
writer.setNull(rowId);
}

@Override
final void setNulls(int rowId, int count) {
for (int i = 0; i < count; i++) {
writer.setNull(rowId + i);
}
}
}

private static class DateWriter extends ArrowVectorWriter {
Expand All @@ -1744,6 +1758,13 @@ void setInts(int rowId, int count, int value) {
final void setNull(int rowId) {
writer.setNull(rowId);
}

@Override
final void setNulls(int rowId, int count) {
for (int i = 0; i < count; i++) {
writer.setNull(rowId + i);
}
}
}

private static class TimestampWriter extends ArrowVectorWriter {
Expand All @@ -1770,6 +1791,13 @@ void setLong(int rowId, long value) {
final void setNull(int rowId) {
writer.setNull(rowId);
}

@Override
final void setNulls(int rowId, int count) {
for (int i = 0; i < count; i++) {
writer.setNull(rowId + i);
}
}
}

private static class ArrayWriter extends ArrowVectorWriter {
Expand Down

0 comments on commit 7d8f210

Please sign in to comment.