mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
This PR includes two parts: 1. The design doc of $fill 2. The implementation of $fill using `rewrite` way. Refer design doc [here](https://msdata.visualstudio.com/CosmosDB/_git/pgmongo/pullrequest/1423500?_a=files&path=/docs/pgmongo/design_docs/data_plane/aggregation_stages/fill.md). 3. Extract bson_expression_partition_by_fields_get() as a common method. So that, some related changes are: a. densify's parse stage is changed b. densify's unit tests is changed due to method name change c. densify's original method for partitionByFields is removed **Noticed:** This implementation is based on the impl of `$linearFill` and `$locf`.
21 lines
695 B
SQL
21 lines
695 B
SQL
CREATE OR REPLACE FUNCTION helio_api_internal.bson_densify_range(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
|
|
RETURNS __CORE_SCHEMA__.bson
|
|
LANGUAGE c
|
|
WINDOW
|
|
STABLE
|
|
AS 'MODULE_PATHNAME', $function$bson_densify_range$function$;
|
|
|
|
CREATE OR REPLACE FUNCTION helio_api_internal.bson_densify_partition(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
|
|
RETURNS __CORE_SCHEMA__.bson
|
|
LANGUAGE c
|
|
WINDOW
|
|
STABLE
|
|
AS 'MODULE_PATHNAME', $function$bson_densify_partition$function$;
|
|
|
|
CREATE OR REPLACE FUNCTION helio_api_internal.bson_densify_full(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
|
|
RETURNS __CORE_SCHEMA__.bson
|
|
LANGUAGE c
|
|
WINDOW
|
|
STABLE
|
|
AS 'MODULE_PATHNAME', $function$bson_densify_full$function$;
|