Skip to content

Add views collection tests#238

Merged
eerxuan merged 7 commits into
documentdb:mainfrom
danielfrankcom:pr/views
Jun 1, 2026
Merged

Add views collection tests#238
eerxuan merged 7 commits into
documentdb:mainfrom
danielfrankcom:pr/views

Conversation

@danielfrankcom
Copy link
Copy Markdown
Collaborator

This change adds general tests for views.

The aim here is to test the runtime semantics unique to views like source reflection (insert/update/delete visibility), pipeline composition with aggregate queries, view chaining with depth limit enforcement, read operation behavior (find, aggregate, distinct), and write rejection for unsupported operations.

The ViewCollection helper in target_collection.py was refactored to accept a raw options dict, making it easier to test arbitrary view configurations without needing to add a new field for each option.

@danielfrankcom danielfrankcom requested a review from a team as a code owner May 25, 2026 22:44
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels May 25, 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.90 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (633+10 LOC, 7 files); LLM: Adds new compatibility test coverage for view collection semantics (read ops, write rejection, pipeline composition, chaining depth limits), with a small refactor to the ViewCollection helper in target_collection.py.

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.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from yshanhu May 29, 2026 17:21
The view depth limit boundary differs between engines, so testing the
exact boundary is not a meaningful compatibility surface. The view-on-view
composition test remains.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
danielfrankcom and others added 2 commits June 1, 2026 11:11
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@eerxuan eerxuan merged commit fa71907 into documentdb:main Jun 1, 2026
12 checks passed
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.

3 participants