mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-06 11:02:50 -05:00
### 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) Yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support order and composite extensibility for documentdb_rum via index am extensibility in documentdb. ---- #### AI description (iteration 1) #### PR Classification This pull request introduces a new feature by adding support for documentdb_rum via index extensibility. #### PR Summary The changes integrate a new index access method for documentdb_rum, updating core indexing interfaces, schema definitions, and build/test scripts to enable extended RUM indexing functionality. Key updates include: - **`internal/pg_documentdb_rum/src/documentdb_rum_adapter.c`**: Introduces the new `documentdb_extended_rum` handler with functions for scan, build, insert, and others. - **`include/index_am/index_am_exports.h` and related utility files**: Add and update APIs for index extensibility (including multikey status support) to accommodate the new handler. - **`pg_documentdb/src/index_am/create_indexes.c`**: Modifies index creation logic to use new opclass schemas and integrate the extended rum index handler. - **SQL schema files (e.g., `documentdb_rum--1.0.sql` and operator class scripts)**: Define the new extension schema, operator classes, and functions required for extended RUM. - **Build scripts and regression test files**: Update Makefiles and expected test outputs to load, build, and validate the documentdb_rum extension functionality. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
16 lines
797 B
SQL
16 lines
797 B
SQL
-- File that defines macros for our SQL preprocessing
|
|
#define __CONCAT__(x, y) x##y
|
|
#define __EXPANDED_EXTENSION_FUNCTION__(PREFIX, NAME) __CONCAT__(PREFIX,NAME)
|
|
|
|
#define __EXTENSION_OBJECT__(NAME) __EXPANDED_EXTENSION_FUNCTION__(__EXTENSION_OBJECT_PREFIX__, NAME)
|
|
#define __EXTENSION_OBJECT_V2__(NAME) __EXPANDED_EXTENSION_FUNCTION__(__EXTENSION_OBJECT_PREFIX_V2__, NAME)
|
|
|
|
|
|
#define __SINGLE_QUOTE_CHAR__ '
|
|
#define __CONCAT_3__(x, y, z) x##y##z
|
|
#define __CONCAT_4__(w, x, y, z) w##x##y##z
|
|
|
|
#define __CONCAT_NAME_FUNCTION__(PREFIX, NAME, SUFFIX) __CONCAT_3__(PREFIX, NAME, SUFFIX)
|
|
#define __SINGLE_QUOTED_STRING__(x) __CONCAT_NAME_FUNCTION__(__SINGLE_QUOTE_CHAR__, x, __SINGLE_QUOTE_CHAR__)
|
|
|
|
#define __EXTENSION_INDEX_OPCLASS__(NAME, INDEXOPCLASSTYPE) __CONCAT_4__(bson_, NAME, _, INDEXOPCLASSTYPE) |