presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/datatypes/PrestoThriftInteger.java/PrestoThriftInteger/toBlock
class PrestoThriftInteger:    @Override
    public Block toBlock(Type desiredType)
    {
        checkArgument(INTEGER.equals(desiredType), "type doesn't match: %s", desiredType);
        int numberOfRecords = numberOfRecords();
        return new IntArrayBlock(
                numberOfRecords,
                Optional.ofNullable(nulls),
                ints == null ? new int[numberOfRecords] : ints);
    }