Skip to content

Added core indexes property tests for sparse#185

Open
vic-tsang wants to merge 1 commit into
documentdb:mainfrom
vic-tsang:core/index/sparse/tests
Open

Added core indexes property tests for sparse#185
vic-tsang wants to merge 1 commit into
documentdb:mainfrom
vic-tsang:core/index/sparse/tests

Conversation

@vic-tsang
Copy link
Copy Markdown
Collaborator

This PR contains:

  • core indexes property tests for sparse

Ref:

@vic-tsang vic-tsang requested a review from a team as a code owner May 14, 2026 19:06
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels May 14, 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.82 (mixed)

Reasoning

component from path globs (test-coverage); effort from diff stats (991+0 LOC, 8 files); LLM: Adds new property-based test coverage for sparse indexes, expanding the compatibility test suite as part of a tracked issue.

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.

@vic-tsang vic-tsang force-pushed the core/index/sparse/tests branch from ba895ed to 205de84 Compare May 14, 2026 21:15
Signed-off-by: Victor Tsang <vitsangp@amazon.com>
@vic-tsang vic-tsang force-pushed the core/index/sparse/tests branch from f21a33f to 5dff8f6 Compare May 15, 2026 22:55
@vic-tsang
Copy link
Copy Markdown
Collaborator Author

fixed conflict and rebase

assertSuccess(result, test.expected, raw_res=True)


def test_sparse_text_skips_missing_text(collection):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 [Required] test_sparse_text_skips_missing_text and test_sparse_exists_false_not_affected both belong outside properties/sparse/

def test_sparse_text_skips_missing_text(collection):
"""Test text index is always sparse — skips docs without text field."""
...indexes=[{"key": {"content": "text"}, "name": "idx_text"}],

This test creates a text index without sparse: True and asserts text-index-implicit-sparse behavior. The "text index is always sparse" property belongs in a text-index test folder (or
properties/sparse/test_implicit_sparse.py), not in this folder which is about explicit sparse option.

Same for test_sparse_exists_false_not_affected — the property tested is "$exists:false works correctly" which is a $exists query operator concern, not sparse-specific.

These two would live better in:

  • text_search/ for the text-implicit-sparse test
  • query/misc/exists/ for the $exists:false test

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