Files
documentdb/pg_helio_api/sql/udfs/aggregation/bson_densify_functions--latest.sql
T
Jinrui Zhang 55b25d9c55 Merged PR 1423500: Implementation of $fill stage
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`.
2024-09-19 20:36:13 +03:00

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$;