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