Commits


tianchen authored and Micah Kornfield committed 36a3782d680
ARROW-5225: [Java] Improve performance of BaseValueVector#getValidityBufferSizeFromCount Now in BaseValueVector#getValidityBufferSizeFromCount and BitVectorHelper#getValidityBufferSize, it uses Math.ceil to calculate size which is not efficient (lots of unnecessary logic in StrictMath#floorOrCeil) . Since the valueCount is always not less than 0, we could simply replace Math.ceil with the following code: return valueCount % 8 > 0 ? valueCount / 8 + 1 : valueCount / 8; Author: tianchen <niki.lj@alibaba-inc.com> Closes #4218 from tianchen92/ARROW-5225 and squashes the following commits: e469c4a8 <tianchen> resolve comments 7f4a3a23 <tianchen> ARROW-5225: Improve performance of BaseValueVector#getValidityBufferSizeFromCount