Files
documentdb/pg_helio_core/include/collation
Jayanta Mondal a511a8c252 Merged PR 1443760: [engine] collator cache, and support for $in with collation , $lookup with collation
### 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)
No

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

1. Introduces a backend process level collator cache so that we open a collator for a specific collation string once per backend process
2. Uses collation-based sort key generation for string for supporting $in which uses Hashmap for membership check. We wanted the keys of the HashMap to be collation-aware for UTF8 keys.

----
#### AI description  (iteration 1)
#### PR Classification
Code enhancement to improve collation handling in string comparison.

#### PR Summary
This pull request refines the string comparison logic using ICU collation in the `bson_compare.c` file.
- `bson_compare.c`: Replaced custom ICU collator creation with `ucol_open` and added error handling for unsupported collations. Closed the collator after use to prevent resource leaks.
- `bson_compare.c`: Added a reference to the ICU documentation for better clarity.

Related work items: #3412412, #3431062, #3456172
2024-09-12 13:51:02 +03:00
..