@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 testReadBlockAllNullsOption2()
    {
        PrestoThriftBlock columnsData = longColumn(
                new boolean[] {true, true, true, true, true, true, true},
                new long[] {0, 0, 0, 0, 0, 0, 0});
        Block actual = columnsData.toBlock(BIGINT);
        assertBlockEquals(actual, list(null, null, null, null, null, null, null));
    }