Skip to content

Add $rank and $denseRank window operator compatibility tests - #716

Open
thanh-ttt wants to merge 1 commit into
documentdb:mainfrom
thanh-ttt:rank-tests
Open

Add $rank and $denseRank window operator compatibility tests#716
thanh-ttt wants to merge 1 commit into
documentdb:mainfrom
thanh-ttt:rank-tests

Conversation

@thanh-ttt

@thanh-ttt thanh-ttt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Add $rank and $denseRank window operator compatibility tests

Adds comprehensive test coverage for $rank and $denseRank under $setWindowFields, following the same patterns as
$documentNumber. Three test files were added for each operator (6 files total, 76 tests):

File Dimension
test_window_*_argument_validation.py Asserting valid syntax (1. Of the form { $denseRank: { } } or { $rank: { } }, 2. Must have only 1 valid sortBy value, 3. No window can be specified)
test_window_*_order_dependence.py Ascending vs descending sort produces different rankings, ranking restarts per partition, omitted partitionBy treats collection as one partition
test_window_*_tie_handling.py No ties, all ties, partial ties at beginning/middle/end, multiple tie groups

Key behavioral differences tested:

Signed-off-by: Thanh Tong <thanhttt@amazon.com>
@thanh-ttt
thanh-ttt requested a review from a team as a code owner August 7, 2026 18:40
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Aug 7, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.95 (mixed)

Reasoning

component 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 @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant