When returning arrays of primitives (DoubleArray, BooleanArray, BigIntArray) from Java, we used getRegion from the primitive array to copy it directly into the std::vector::data().
The problem with that is that data() will not be properly sized in our case because we used std::vector::reserve(..) beforehand - instead of constructing the std::vector with a fixed size already.
When returning arrays of primitives (
DoubleArray
,BooleanArray
,BigIntArray
) from Java, we usedgetRegion
from the primitive array to copy it directly into thestd::vector::data()
.The problem with that is that
data()
will not be properly sized in our case because we usedstd::vector::reserve(..)
beforehand - instead of constructing thestd::vector
with a fixed size already.This PR fixes that.