@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(expectedExceptions = IllegalArgumentException.class)
    public void testReadBlockWrongActualType()
    {
        PrestoThriftBlock columnsData = integerData(new PrestoThriftInteger(null, null));
        columnsData.toBlock(BIGINT);
    }