Add $rank and $denseRank window operator compatibility tests - #716
Add $rank and $denseRank window operator compatibility tests#716thanh-ttt wants to merge 1 commit into
Conversation
Signed-off-by: Thanh Tong <thanhttt@amazon.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (1183+0 LOC, 6 files); LLM: Adds 6 new compatibility test files (76 tests) covering $rank and $denseRank window operators under $setWindowFields, expanding test coverage for important aggregation functionality. If a label is wrong, remove it manually and ping |
eerxuan
left a comment
There was a problem hiding this comment.
The empty-collection error tests (test_rank_window_key_errors_on_empty_collection etc.) assert the same error codes as their populated counterparts, differing only to prove the error is parse-time — a code-path distinction rather than observable behavior.
Add $rank and $denseRank window operator compatibility tests
Adds comprehensive test coverage for
$rankand$denseRankunder$setWindowFields, following the same patterns as$documentNumber. Three test files were added for each operator (6 files total, 76 tests):test_window_*_argument_validation.py{ $denseRank: { } }or{ $rank: { } }, 2. Must have only 1 validsortByvalue, 3. No window can be specified)test_window_*_order_dependence.pypartitionBytreats collection as one partitiontest_window_*_tie_handling.pyKey behavioral differences tested:
$rank: Tied documents share the same rank, next rank skips positions (1, 1, 3)$denseRank: Tied documents share the same rank, next rank is dense / no gap (1, 1, 2)