Skip to content

Memory issue when using bitmap_intersection #1

@markedmondson

Description

@markedmondson

I have a table with an array of integers and I want to run a comparison to extract any rows that include a subset of integers.

SELECT bitmap_intersection(to_bitmap('{1, 2, 3}'), to_bitmap(ids)) FROM table;
=> Query 1 ERROR: ERROR: invalid memory alloc request size 18446744073709551576

Just casting the ids to_bitmap is fine so I'm guessing it's something in the intersection function. What I'm actually looking to get out, however, is a boolean, the same as && provides me. I don't care what the intersection is so presumably there's some sort of performance improvement that could be achieved by providing that functionality and not returning the actual intersection?

Thanks!

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