mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) UDF ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Implemented covariancePop & covarianceSamp for setWindowFields ---- #### AI description (iteration 1) #### PR Classification Documentation #### PR Summary This pull request adds design documentation for the `$covariancePop` and `$covarianceSamp` aggregation operators. - Added `covariancePop.md` detailing the specification, behavior, examples, implementation plan, and test plan for the `$covariancePop` operator. - Added `covarianceSamp.md` detailing the specification, behavior, examples, implementation plan, and test plan for the `$covarianceSamp` operator.
26 lines
1.1 KiB
SQL
26 lines
1.1 KiB
SQL
CREATE OR REPLACE AGGREGATE helio_api_internal.BSONCOVARIANCEPOP(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
|
|
(
|
|
SFUNC = helio_api_internal.bson_covariance_pop_samp_transition,
|
|
FINALFUNC = helio_api_internal.bson_covariance_pop_final,
|
|
MSFUNC = helio_api_internal.bson_covariance_pop_samp_transition,
|
|
MFINALFUNC = helio_api_internal.bson_covariance_pop_final,
|
|
MINVFUNC = helio_api_internal.bson_covariance_pop_samp_invtransition,
|
|
stype = bytea,
|
|
mstype = bytea,
|
|
COMBINEFUNC = helio_api_internal.bson_covariance_pop_samp_combine,
|
|
PARALLEL = SAFE
|
|
);
|
|
|
|
|
|
CREATE OR REPLACE AGGREGATE helio_api_internal.BSONCOVARIANCESAMP(__CORE_SCHEMA__.bson, __CORE_SCHEMA__.bson)
|
|
(
|
|
SFUNC = helio_api_internal.bson_covariance_pop_samp_transition,
|
|
FINALFUNC = helio_api_internal.bson_covariance_samp_final,
|
|
MSFUNC = helio_api_internal.bson_covariance_pop_samp_transition,
|
|
MFINALFUNC = helio_api_internal.bson_covariance_samp_final,
|
|
MINVFUNC = helio_api_internal.bson_covariance_pop_samp_invtransition,
|
|
stype = bytea,
|
|
mstype = bytea,
|
|
COMBINEFUNC = helio_api_internal.bson_covariance_pop_samp_combine,
|
|
PARALLEL = SAFE
|
|
); |