mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? No ### 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 As part of testing out the composite operator classes, introduce a new composite operator class for Bson. This will be behind a test only GUC and will be for testing composite index pushdown. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request introduces a new composite operator class for BSON GIN indexes in PostgreSQL. - Added `bson_gin_composite_entrypoint.c` to implement GIN operator functions for BSON composite indexes. - Created test cases in `bson_composite_index_tests_insert_terms.out` to validate term generation for composite paths. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
14 lines
1.5 KiB
SQL
14 lines
1.5 KiB
SQL
CREATE OPERATOR CLASS __API_SCHEMA_INTERNAL_V2__.bson_rum_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),
|
|
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; |