mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description more ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for collation in BSON projection functions. - Added new SQL functions in `sql/udfs/projection/bson_projection--0.102-0.sql` to handle collation. - Updated `src/aggregation/bson_project.c` to include collation string handling in BSON projection. - Modified `src/aggregation/bson_aggregation_pipeline.c` to support collation in projection stages. - Enhanced `src/query/bson_dollar_operators.c` to populate collation string in query state. - Added collation-related tests in `sql/bson_dollar_ops_collation_tests_runtime.sql`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #3918941
17 lines
745 B
PL/PgSQL
17 lines
745 B
PL/PgSQL
#include "udfs/metadata/list_databases--0.102-0.sql"
|
|
#include "udfs/ttl/ttl_support_functions--0.102-0.sql"
|
|
#include "udfs/commands_diagnostic/current_op--0.102-0.sql"
|
|
#include "udfs/query/bson_query_match--0.102-0.sql"
|
|
#include "udfs/projection/bson_projection--0.102-0.sql"
|
|
#include "udfs/aggregation/bson_aggregation_redact--0.102-0.sql"
|
|
#include "udfs/aggregation/bson_merge_functions--0.102-0.sql"
|
|
|
|
-- Schedule TTL Cron job to prune TTL indexes on every documentdb instance.
|
|
DO LANGUAGE plpgsql $cmd$
|
|
BEGIN
|
|
IF NOT EXISTS(SELECT 1 FROM cron.job where jobname = 'documentdb_ttl_task') THEN
|
|
PERFORM cron.schedule('documentdb_ttl_task', '* * * * *', $$CALL documentdb_api_internal.delete_expired_rows();$$);
|
|
END IF;
|
|
END;
|
|
$cmd$;
|