in thriftserver/session/src/main/java/org/apache/livy/thriftserver/session/ColumnBuffer.java [359:410]
private void ensureCapacity() {
int nextSize = (currentSize + DEFAULT_SIZE);
nextSize = nextSize - (nextSize % DEFAULT_SIZE);
switch (type) {
case BOOLEAN:
if (bools.length <= currentSize) {
bools = Arrays.copyOf(bools, nextSize);
}
break;
case BYTE:
if (bytes.length <= currentSize) {
bytes = Arrays.copyOf(bytes, nextSize);
}
break;
case SHORT:
if (shorts.length <= currentSize) {
shorts = Arrays.copyOf(shorts, nextSize);
}
break;
case INTEGER:
if (ints.length <= currentSize) {
ints = Arrays.copyOf(ints, nextSize);
}
break;
case LONG:
if (longs.length <= currentSize) {
longs = Arrays.copyOf(longs, nextSize);
}
break;
case FLOAT:
if (floats.length <= currentSize) {
floats = Arrays.copyOf(floats, nextSize);
}
break;
case DOUBLE:
if (doubles.length <= currentSize) {
doubles = Arrays.copyOf(doubles, nextSize);
}
break;
case BINARY:
if (buffers.length <= currentSize) {
buffers = Arrays.copyOf(buffers, nextSize);
}
break;
case STRING:
if (strings.length <= currentSize) {
strings = Arrays.copyOf(strings, nextSize);
}
break;
}
}