Add $covariancePop and $covarianceSamp window operator compatibility … - #714
Conversation
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, docs); effort from diff stats (7759+2 LOC, 15 files); LLM: Adds 14 new compatibility test files (241 tests) covering $covariancePop and $covarianceSamp window operators across all §22 dimensions, plus a TEST_COVERAGE.md update — multi-file, one component, important feature coverage. If a label is wrong, remove it manually and ping |
eerxuan
left a comment
There was a problem hiding this comment.
Overall good.
Fix before merge:
- 🟠 negative_correlation_order_independent (Pop & Samp) doesn't test order-independence — it only runs
the ascending sort and asserts -4.0, never the descending compare. Add the descending run, or rename and
drop the claim. (Dimension is still covered elsewhere in the file, so not blocking.)
Nits:
- 🟢 argument_validation and order_independence files hand-roll pipelines where run_window_operator()
would fit. - 🟢 COVAR_DOCS redefined per file — could move to window/utils/.
Strengths: rigorous 4-case overflow coverage with signed ±Infinity assertions; correct single-element
split (Pop→0.0, Samp→None); expected values faithful to the reference server; the §22 doc update is
genuinely good.
…tests Covers argument validation, field paths, frame computation, non-numeric handling, numeric precision (incl. Decimal128), order independence, and special float behavior for both operators. Uses run_window_operator() from shared utils where applicable and consolidates COVAR_DOCS into window/utils/window_test_case.py. Signed-off-by: Cassie Lyu <shanslyu@amazon.com>
708ef5c to
9c99837
Compare
Summary
$covariancePopand$covarianceSampwindow operatorsTEST_COVERAGE.md§22 with overflow requirements for multi-expression operatorsTest Coverage
Each operator has 7 test files covering all dimensions from
TEST_COVERAGE.md§22 (Window Operator Coverage):test_window_*_argument_validation.pytest_window_*_field_paths.pytest_window_*_frame_computation.pytest_window_*_non_numeric_handling.pytest_window_*_numeric_precision.pytest_window_*_order_independence.pytest_window_*_special_floats.pyKey behavioral differences tested:
$covariancePop: divides by N (single element → 0)$covarianceSamp: divides by N-1 (single element → null)Test plan