mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Aggregation stages which do not support collation yet: `bucket, group, setWindowFields, fill, geoNear, sortByCount` If collation is provided for an aggregation whose pipeline has any of these stages, the aggregation fails with `FEATURE_NOT_SUPPORTED` ---- #### AI description (iteration 1) #### PR Classification Code enhancement to handle unsupported aggregation stages with collation. #### PR Summary This pull request adds error handling for unsupported aggregation stages when collation is applied. - `bson_aggregation_pipeline.c`, `bson_aggregation_nested_pipeline.c`, `bson_aggregation_window_operators.c`: Added checks and error messages for unsupported collation in stages like `$bucket`, `$replaceWith`, `$geoNear`, `$fill`, `$group`, `$documents`, `$setWindowFields`, and `$sortByCount`. - `bson_dollar_ops_collation_tests_runtime.sql`: Added test cases for unsupported aggregation stages with collation. - `bson_dollar_ops_collation_tests_runtime.out`: Updated expected output to include error messages for unsupported collation in various stages. - `bson_query.h`: Refactored `IsBsonTypeCollationAware` function for better readability. - `bson_dollar_operators.c`: Simplified collation applicability check using `IsBsonTypeCollationAware`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4022806