Merged PR 1412059: implementation of $LinearFill and $locf for $setWindowFields

This PR is used for implementation of `$linearFill` and `$locf` for `$setWindowFields`. It includes:

1) The design doc for $linearFill and $locf
2) The implementation of $linearFill and $locf for verification purpose.

The detailed design and implementation could be refered in the design docs:

[$linearFill](https://msdata.visualstudio.com/CosmosDB/_git/pgmongo/pullrequest/1412059?_a=files&path=/docs/pgmongo/design_docs/data_plane/aggregation_operators/linearfill.md),

[$locf](https://msdata.visualstudio.com/CosmosDB/_git/pgmongo/pullrequest/1412059?_a=files&path=/docs/pgmongo/design_docs/data_plane/aggregation_operators/locf.md)
This commit is contained in:
Jinrui Zhang authored and Murat Tuncer committed 2024-09-05 18:18:23 +03:00
1 parent b36e62a18b
commit ffe78264e1
7 files changed
+576 -5

No files matched your search

@@ -59,4 +59,18 @@ CREATE OR REPLACE FUNCTION helio_api_internal.bson_exp_moving_avg(__CORE_SCHEMA_
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_exp_moving_avg$function$;
AS 'MODULE_PATHNAME', $function$bson_exp_moving_avg$function$;
CREATE OR REPLACE FUNCTION helio_api_internal.bson_linear_fill(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
RETURNS __CORE_SCHEMA__.bson
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_linear_fill$function$;
CREATE OR REPLACE FUNCTION helio_api_internal.bson_locf_fill(__CORE_SCHEMA__.bson)
RETURNS __CORE_SCHEMA__.bson
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_locf_fill$function$;
@@ -59,4 +59,18 @@ CREATE OR REPLACE FUNCTION helio_api_internal.bson_exp_moving_avg(__CORE_SCHEMA_
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_exp_moving_avg$function$;
AS 'MODULE_PATHNAME', $function$bson_exp_moving_avg$function$;
CREATE OR REPLACE FUNCTION helio_api_internal.bson_linear_fill(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
RETURNS __CORE_SCHEMA__.bson
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_linear_fill$function$;
CREATE OR REPLACE FUNCTION helio_api_internal.bson_locf_fill(__CORE_SCHEMA__.bson)
RETURNS __CORE_SCHEMA__.bson
LANGUAGE c
STABLE
WINDOW
AS 'MODULE_PATHNAME', $function$bson_locf_fill$function$;