From 7d8f21028c8374b8c9155c59f9e4ab2fa182031a Mon Sep 17 00:00:00 2001 From: offthewall123 Date: Thu, 4 Feb 2021 15:58:35 +0800 Subject: [PATCH] [NSE-81] add missing setNulls methods in ArrowWritableColumnVector (#79) * add missing setNulls methods in ArrowWritableColumnVector * miss a @Override --- .../vectorized/ArrowWritableColumnVector.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/core/src/main/java/com/intel/oap/vectorized/ArrowWritableColumnVector.java b/core/src/main/java/com/intel/oap/vectorized/ArrowWritableColumnVector.java index f7532cf71..bc2ea54d0 100644 --- a/core/src/main/java/com/intel/oap/vectorized/ArrowWritableColumnVector.java +++ b/core/src/main/java/com/intel/oap/vectorized/ArrowWritableColumnVector.java @@ -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); @@ -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 { @@ -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 { @@ -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 {