class PrestoThriftBigint implements PrestoThriftColumnData {

    @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);
    }

    @ThriftConstructor public  PrestoThriftBigint(
            @ThriftField(name = "nulls") @Nullable boolean[] nulls,
            @ThriftField(name = "longs") @Nullable long[] longs);

}