presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/datatypes/PrestoThriftDouble.java/PrestoThriftDouble/toBlock
class PrestoThriftDouble:    @Override
    public Block toBlock(Type desiredType)
    {
        checkArgument(DOUBLE.equals(desiredType), "type doesn't match: %s", desiredType);
        int numberOfRecords = numberOfRecords();
        long[] longs = new long[numberOfRecords];
        if (doubles != null) {
            for (int i = 0; i < numberOfRecords; i++) {
                longs[i] = doubleToLongBits(doubles[i]);
            }
        }
        return new LongArrayBlock(
                numberOfRecords,
                Optional.ofNullable(nulls),
                longs);
    }