mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature + BugFix ### 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? Yes, yes. ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description 1. Supporting index term truncation for for nested objects (like arrays/objects or arrays/objects) 2. Fixing a release blocker bug that created wrong index term for single key wildcard index. ---- #### AI description (iteration 1) #### PR Classification New feature: Index term truncation for nested arrays and objects in BSON documents. #### PR Summary This pull request introduces functionality to truncate index terms for arrays of objects and nested objects/arrays in BSON documents to adhere to size limits. - `oss/pg_helio_api/src/opclass/gin_index_term.c`: Added logic to handle truncation for `BSON_TYPE_DOCUMENT` and `BSON_TYPE_ARRAY` with specific size limits. - `oss/pg_helio_core/src/io/pgbson.c`: Enhanced error messages to include specific BSON value types when values are too large to append.