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, yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support sorting with collation. We define new custom sort operators which compare operands using applicable collation string. `<<<` is for ascending order. `>>>` is for descending order. Example: `SELECT * from <collection> ORDER BY <value> USING <<<` This will further be used for partitioning, grouping, and related comparisons. ---- #### AI description (iteration 1) #### PR Classification New feature: Support for collation in sort operations. #### PR Summary This pull request adds support for collation in sort operations within the database engine. - `src/test/regress/expected/bson_dollar_ops_collation_tests_runtime.out`: Added multiple test cases to verify collation behavior with various sort and order by operations, including case sensitivity and numeric ordering. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4014123
16 lines
563 B
PL/PgSQL
16 lines
563 B
PL/PgSQL
#include "udfs/query/bson_orderby--0.104-0.sql"
|
|
#include "operators/bson_orderby_operators--0.104-0.sql"
|
|
#include "operators/bson_btree_orderby_operators_family--0.104-0.sql"
|
|
#include "schema/bson_orderby_hash_operator_class--0.104-0.sql"
|
|
|
|
#include "udfs/projection/bson_projection--0.104-0.sql"
|
|
#include "udfs/index_mgmt/create_index_background--0.104-0.sql"
|
|
#include "udfs/schema_mgmt/compact--0.104-0.sql"
|
|
|
|
-- Schedule the index build task
|
|
DO LANGUAGE plpgsql $cmd$
|
|
BEGIN
|
|
PERFORM __API_SCHEMA_INTERNAL__.schedule_background_index_build_jobs();
|
|
END;
|
|
$cmd$;
|