Files
Vinod Sridharan 5a7b36d6ec Merged PR 1767749: Port roaring bitmap implementation to DocumentDB
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description

Port code into OSS - for multi-key we were using roaring bitmaps - port this change into OSS and make it the default implementation.

----
#### AI description  (iteration 1)
#### PR Classification
This PR introduces a new feature by integrating the CRoaring bitmap library into DocumentDB.

#### PR Summary
The changes port the roaring bitmap implementation to DocumentDB by moving and updating key components, adjusting build settings, and adding required licensing documentation.
- **`oss/pg_documentdb/src/index_am/rum.c`**: Updates include registering the roaring bitmap state functions (setting `IndexArrayStateFuncs` to `&RoaringStateFuncs`) with improved error handling on duplicate registration.
- **File moves**: The adapter file was moved from `pgmongo/src/bitmap_utils/roaring_bitmap_adapter.c` to `oss/pg_documentdb/src/index_am/roaring_bitmap_adapter.c`, with corresponding include path updates in several files.
- **`oss/pg_documentdb/Makefile`**: Modified to add the build flag `-DCROARING_ATOMIC_IMPL=3` for using the C atomics implementation, while the same flag was removed from `pgmongo/Makefile`.
- **Initialization changes**: In `oss/pg_documentdb/src/pg_documentdb.c`, a new hook `RegisterRoaringBitmapHooks()` is now registered during module initialization.
- **Licensing and notice updates**: A new CRoaring license file was added and the `oss/NOTICE` file was updated to include CRoaring attribution.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-08-13 15:53:16 +08:00

37 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This product includes third-party components distributed under various licenses. Full license texts and notices for these components are provided in the 'licenses/' directory.
- RUM Extension for PostgreSQL (https://github.com/postgrespro/rum)
Licensed under the PostgreSQL License
Copyright (c) PostgreSQL Global Development Group
- libbson – https://github.com/mongodb/mongo-c-driver
Licensed under the Apache License 2.0
(See licenses/LICENSE_libbson.txt for bundled third‑party NOTICE details)
- Intel Decimal Floating Point Math Library (https://git.launchpad.net/ubuntu/+source/intelrdfpmath)
Licensed under the Intel Simplified Software License
Copyright (c) Intel Corporation
- PCRE2 (https://github.com/PCRE2Project/pcre2)
Licensed under the BSD 3-Clause License
Copyright (c) University of Cambridge
- PostgreSQL (https://github.com/postgres/postgres)
Licensed under the PostgreSQL License
Copyright (c) PostgreSQL Global Development Group
- pg_cron (https://github.com/citusdata/pg_cron)
Licensed under the PostgreSQL License
Copyright (c) Citus Data
- pgvector (https://github.com/pgvector/pgvector)
Licensed under the PostgreSQL License
Copyright (c) pgvector contributors
- PostGIS (https://download.osgeo.org/postgis/source/postgis-3.1.9.tar.gz and 3.5.2.tar.gz)
Licensed under the GNU General Public License, version 2 or later (GPL-2.0+)
Copyright (c) Refractions Research, Paul Ramsey, and others
- CRoaring (https://github.com/RoaringBitmap/CRoaring)
Licensed under the MIT license
Copyright 2016-2022 The CRoaring authors