Re: Sparse bit set data structure

From: Adrien NAYRAT <adrien(dot)nayrat(at)anayrat(dot)info>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Claudio Freire <klaussfreire(at)gmail(dot)com>
Subject: Re: Sparse bit set data structure
Date: 2019-03-28 14:46:03
Message-ID: dd07fed3-99aa-a2e1-19e2-c14e1e898049@anayrat.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

According to the draw and simple8b_mode struct comment, it seems there
is a typo:

> * 20-bit integer 20-bit integer 20-bit integer
> * 1101 00000000000000010010 01111010000100100000 00000000000000010100
> * ^
> * selector
> *
> * The selector 1101 is 13 in decimal. From the modes table below, we see
> * that it means that the codeword encodes three 12-bit integers. In decimal,
> * those integers are 18, 500000 and 20. Because we encode deltas rather than
> * absolute values, the actual values that they represent are 18, 500018 and
> * 500038.
[...]
> {20, 3}, /* mode 13: three 20-bit integers */

The comment should be "the codeword encodes three *20-bit* integers" ?

Patch attached.

Regards,

Attachment Content-Type Size
fix-typo.patch text/x-patch 700 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-03-28 14:53:59 Re: Progress reporting for pg_verify_checksums
Previous Message Fred .Flintstone 2019-03-28 14:05:53 Re: PostgreSQL pollutes the file system