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 Support for pushdown of to PFE indexes ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for pushdown operations to PFE indexes, enhancing query performance and index utilization. - Added new functions in `sql/udfs/index_mgmt/bson_indexbounds_functions--0.102-0.sql` for BSON index bounds operations. - Introduced new operators in `sql/operators/bson_btree_pfe_operators--0.102-0.sql` for BSON and BSON query comparisons. - Updated `src/query/query_operator.c` to handle new index bounds operators and expressions. - Added new type definitions in `sql/types/bsonindexbounds--0.102-0.sql` for BSON index bounds. - Modified `src/metadata/metadata_cache.c` to include OIDs and functions for BSON index bounds types and operators. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
33 lines
1.5 KiB
PL/PgSQL
33 lines
1.5 KiB
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"
|
|
|
|
#include "udfs/aggregation/group_aggregates_support--0.102-0.sql"
|
|
#include "udfs/aggregation/group_aggregates--0.102-0.sql"
|
|
|
|
#include "types/bsonindexbounds--0.102-0.sql"
|
|
#include "udfs/index_mgmt/bson_indexbounds_functions--0.102-0.sql"
|
|
#include "operators/bson_btree_pfe_operators--0.102-0.sql"
|
|
#include "operators/bsonindexbounds_btree_pfe_family--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$;
|
|
|
|
DROP AGGREGATE IF EXISTS __API_CATALOG_SCHEMA__.BSON_OUT(__CORE_SCHEMA__.bson, text, text, text, text);
|
|
DROP FUNCTION IF EXISTS __API_CATALOG_SCHEMA__.bson_out_transition;
|
|
DROP FUNCTION IF EXISTS __API_CATALOG_SCHEMA__.bson_out_final;
|
|
|
|
-- ALTER creation_time column for all the documentdb tables
|
|
#include "udfs/schema_mgmt/data_table_upgrade--0.102-0.sql"
|
|
SELECT __API_SCHEMA_INTERNAL_V2__.apply_extension_data_table_upgrade(0, 102, 0);
|