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