Skip to content

rb_to_array and rb_min exhibits inconsistent results in a malformed serialize input #45

@ChenHuajun

Description

@ChenHuajun

As mentioned in PR #42, the roaring_buffer_reader exhibits inconsistent results, as follows:

postgres=# select rb_to_array('\x3a300000010000000000000000000000000000000000000000000000000000000000000000000000000000000008'::roaringbitmap);
 rb_to_array
-------------
 {0}
(1 row)

postgres=# select rb_min('\x3a300000010000000000000000000000000000000000000000000000000000000000000000000000000000000008'::roaringbitmap);
 rb_min
--------
  12346
(1 row)

But the input is a malformed binary, ‘{0}’ should be:

postgres=# select '{0}'::roaringbitmap;
             roaringbitmap
----------------------------------------
 \x3a3000000100000000000000100000000000
(1 row)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions