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

8 lines
196 B
Plaintext

# all C files (implementation and header) use our style...
*.[ch] citus-style
pg_documentdb/src/roaring_bitmaps/*.[ch] -citus-style
* text=auto
*.sh text eol=lf
*.md text eol=lf
*.sql text eol=lf