}
else if (type.getJavaType() == double.class) {
type.writeDouble(nullsBlockBuilder, type.getDouble(testBlock, position));
}
else if (type.getJavaType() == Slice.class) {
Slice slice = type.getSlice(testBlock, position);
type.writeSlice(nullsBlockBuilder, slice, 0, slice.length());
}
else {
throw new RuntimeException("Unsupported Java type " + type.getJavaType());
}
nullsBlockBuilder.appendNull();