Skip to content

Commit bb373d9

Browse files
committed
re-add BaseValueVector method back
1 parent 248164b commit bb373d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

vector/src/main/java/org/apache/arrow/vector/BaseValueVector.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ protected ArrowBuf releaseBuffer(ArrowBuf buffer) {
110110
return buffer;
111111
}
112112

113+
/**
114+
* Compute the size of validity buffer required to manage a given number of elements in a vector.
115+
*
116+
* @param valueCount number of elements in the vector
117+
* @return buffer size
118+
* @deprecated -- use {@link BitVectorHelper#getValidityBufferSizeFromCount} instead.
119+
*/
120+
@Deprecated
121+
protected static int getValidityBufferSizeFromCount(final int valueCount) {
122+
return DataSizeRoundingUtil.divideBy8Ceil(valueCount);
123+
}
124+
113125
/* round up bytes for the validity buffer for the given valueCount */
114126
private static long roundUp8ForValidityBuffer(long valueCount) {
115127
return ((valueCount + 63) >> 6) << 3;

0 commit comments

Comments
 (0)