Add $stddevsamp compatibility tests#661
Conversation
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
Signed-off-by: Jay <jhr4@njit.edu>
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive compatibility test suite for the $stdDevSamp expression accumulator under core/operator/expressions/accumulator/stdDevSamp/, covering core math behavior, boundary/precision behaviors, null/missing semantics, non-numeric handling, and special floating-point values.
Changes:
- Introduces core correctness tests across numeric BSON types and representative numeric patterns (mixed types, negative values, large N, zero variance).
- Adds targeted suites for boundary/precision-loss scenarios and for NaN/Infinity propagation behavior.
- Adds input-form coverage (literal traversal, expression operands, field-path traversal, and invalid field-path parsing) plus null/missing and non-numeric ignore rules.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_core.py | Core numeric correctness and baseline rules (N<2 → null, zero variance, mixed types). |
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_boundaries.py | Boundary and precision-loss/overflow behaviors for ints/doubles. |
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_special_values.py | NaN/Infinity behavior coverage for float + Decimal128. |
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_null_missing.py | Null/missing handling coverage (scalar + array shapes). |
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_non_numeric.py | Behavior when inputs include non-numeric BSON types (ignored vs scalar). |
| documentdb_tests/compatibility/tests/core/operator/expressions/accumulator/stdDevSamp/test_expression_stdDevSamp_input_forms.py | Expression input forms (literal traversal, operands, document paths) + invalid field path errors. |
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (859+0 LOC, 6 files); LLM failed: Invalid response body while trying to fetch https://api.anthropic.com/v1/messages: Premature close If a label is wrong, remove it manually and ping |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jay <jhr4@njit.edu>
7dcbd43 to
0883bcc
Compare
Signed-off-by: Jay <jhr4@njit.edu>
Add compatibility test coverage for $stdDevSamp expression operator covering core, boundary, type validation, null/missing cases.