presto-main/src/main/java/io/prestosql/operator/scalar/ArrayConcatUtils.java/ArrayConcatUtils/appendElement
class ArrayConcatUtils:    @UsedByGeneratedCode
    public static Block appendElement(Type elementType, Block block, Object value)
    {
        BlockBuilder blockBuilder = elementType.createBlockBuilder(null, block.getPositionCount() + 1);
        for (int i = 0; i < block.getPositionCount(); i++) {
            elementType.appendTo(block, i, blockBuilder);
        }

        elementType.writeObject(blockBuilder, value);

        return blockBuilder.build();
    }