public Block createAlternatingNullsBlock(Type type, Block sequenceBlock)
{
BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus());
for (int position = 0; position < sequenceBlock.getPositionCount(); position++) {
// append null
blockBuilder.appendNull();
// append value
type.appendTo(sequenceBlock, position, blockBuilder);
}
return blockBuilder.build();
}