Files
documentdb/pg_documentdb/sql/schema/single_path_operator_class--0.10-0.sql
Vinod Sridharan 09af8231c2 Merged PR 1733803: [OSS] Support documentdb_rum via index extensibility
### 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 -->
2025-07-23 15:56:08 +08:00

29 lines
3.0 KiB
SQL

CREATE OPERATOR CLASS __API_OPCLASS_SCHEMA__.__EXTENSION_INDEX_OPCLASS__(__API_INDEX_PREFIX_NAME__, single_path_ops)
DEFAULT FOR TYPE __CORE_SCHEMA__.bson using __EXTENSION_OBJECT__(_rum) AS
OPERATOR 1 __API_CATALOG_SCHEMA__.@= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 2 __API_CATALOG_SCHEMA__.@> (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 3 __API_CATALOG_SCHEMA__.@>= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 4 __API_CATALOG_SCHEMA__.@< (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 5 __API_CATALOG_SCHEMA__.@<= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 6 __API_CATALOG_SCHEMA__.@*= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 7 __API_CATALOG_SCHEMA__.@!= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 8 __API_CATALOG_SCHEMA__.@!*= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 9 __API_CATALOG_SCHEMA__.@~ (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 10 __API_CATALOG_SCHEMA__.@? (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 11 __API_CATALOG_SCHEMA__.@@# (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 12 __API_CATALOG_SCHEMA__.@# (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 13 __API_CATALOG_SCHEMA__.@&= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 14 __API_CATALOG_SCHEMA__.=?= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 15 __API_CATALOG_SCHEMA__.@!& (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 16 __API_CATALOG_SCHEMA__.@!| (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 17 __API_CATALOG_SCHEMA__.@#? (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 18 __API_CATALOG_SCHEMA__.@& (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 19 __API_CATALOG_SCHEMA__.@| (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 20 __API_CATALOG_SCHEMA__.@% (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
FUNCTION 1 __API_CATALOG_SCHEMA__.gin_bson_compare(bytea, bytea),
FUNCTION 2 __API_CATALOG_SCHEMA__.gin_bson_single_path_extract_value(__CORE_SCHEMA__.bson, internal),
FUNCTION 3 __API_CATALOG_SCHEMA__.gin_bson_extract_query(__CORE_SCHEMA__.bson, internal, int2, internal, internal, internal, internal),
FUNCTION 4 __API_CATALOG_SCHEMA__.gin_bson_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 __API_CATALOG_SCHEMA__.gin_bson_compare_partial(bytea, bytea, int2, internal),
FUNCTION 11 (__CORE_SCHEMA__.bson) __API_CATALOG_SCHEMA__.gin_bson_single_path_options(internal),
STORAGE bytea;