A collection of RoaringBitmap user-defined functions (UDFs) for Apache Flink.
This project provides a temporary solution for RoaringBitmap support in Flink SQL before FLIP-556 is formally supported in Flink. Before that, you can use the published UDF JARs with Flink 1.18 through Flink 2.x.
- Apache Flink 1.18 or later (including Flink 2.x)
- Java 8 or later
Download the latest release JAR from the Releases page, and add it to your Flink lib/ directory or include it in your job's classpath.
Register the UDFs in your Flink SQL environment:
-- Create a RoaringBitmap from a column of integer values
SELECT rb_build_agg(user_id) FROM events GROUP BY dimension;
-- Get the cardinality of a RoaringBitmap
SELECT rb_cardinality(bitmap) FROM bitmaps;
-- Compute the union (OR) of multiple RoaringBitmaps
SELECT rb_or_agg(bitmap) FROM bitmaps GROUP BY dimension;mvn clean packageThis project is licensed under the Apache License 2.0.