Files
documentdb/pg_documentdb/sql/schema/composite_path_operator_class--0.103-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

34 lines
3.6 KiB
SQL

CREATE OPERATOR CLASS __API_OPCLASS_INTERNAL_SCHEMA__.__EXTENSION_INDEX_OPCLASS__(__API_INDEX_PREFIX_NAME__, composite_path_ops)
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),
OPERATOR 25 __API_CATALOG_SCHEMA__.@<> (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 26 __API_SCHEMA_INTERNAL_V2__.@!> (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 27 __API_SCHEMA_INTERNAL_V2__.@!>= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 28 __API_SCHEMA_INTERNAL_V2__.@!< (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
OPERATOR 29 __API_SCHEMA_INTERNAL_V2__.@!<= (__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson),
FUNCTION 1 __API_CATALOG_SCHEMA__.gin_bson_compare(bytea, bytea),
FUNCTION 2 __API_SCHEMA_INTERNAL_V2__.gin_bson_composite_path_extract_value(__CORE_SCHEMA__.bson, internal),
FUNCTION 3 __API_SCHEMA_INTERNAL_V2__.gin_bson_composite_path_extract_query(__CORE_SCHEMA__.bson, internal, int2, internal, internal, internal, internal),
FUNCTION 4 __API_SCHEMA_INTERNAL_V2__.gin_bson_composite_path_consistent(internal, int2, anyelement, int4, internal, internal),
FUNCTION 5 __API_SCHEMA_INTERNAL_V2__.gin_bson_composite_path_compare_partial(bytea, bytea, int2, internal),
FUNCTION 11 (__CORE_SCHEMA__.bson) __API_SCHEMA_INTERNAL_V2__.gin_bson_composite_path_options(internal),
STORAGE bytea;