@Override
    public Block toBlock(Type desiredType)
    {
        checkArgument(BIGINT.equals(desiredType), "type doesn't match: %s", desiredType);
        int numberOfRecords = numberOfRecords();
        return new LongArrayBlock(
                numberOfRecords,
                Optional.ofNullable(nulls),
                longs == null ? new long[numberOfRecords] : longs);
    }
@Test
    public void testReadBlockAllNonNullOption1()
    {
        PrestoThriftBlock columnsData = longColumn(
                null,
                new long[] {2, 7, 1, 3, 8, 4, 5});
        Block actual = columnsData.toBlock(BIGINT);
        assertBlockEquals(actual, list(2L, 7L, 1L, 3L, 8L, 4L, 5L));
    }