Skip to content

Add $filter, $in, $indexOfArray, and $isArray tests#667

Open
alinaliBQ wants to merge 21 commits into
documentdb:mainfrom
alinaliBQ:filter-in-indexOfArray-isArray
Open

Add $filter, $in, $indexOfArray, and $isArray tests#667
alinaliBQ wants to merge 21 commits into
documentdb:mainfrom
alinaliBQ:filter-in-indexOfArray-isArray

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This change adds tests for the $filter, $in, $indexOfArray, and $isArray expression. They were originally authored by @leszek-bq.

Closes #291, #292, #293, #294

@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jul 6, 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 XL · Status In Progress
Confidence: 0.88 (mixed)

Reasoning

component from path globs (test-coverage); effort from diff stats (5749+4 LOC, 37 files); LLM: Adds new test cases for four array expressions ($filter, $in, $indexOfArray, $isArray) plus a new ArrayTestClass definition, expanding compatibility test coverage across multiple operators.

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.

@alinaliBQ alinaliBQ marked this pull request as ready for review July 6, 2026 22:55
@alinaliBQ alinaliBQ requested a review from a team as a code owner July 6, 2026 22:55

@alinaliBQ alinaliBQ left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed Paterson's comments and converted more standalone cases to ExpressionTestCase

@alinaliBQ alinaliBQ left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressing Daniel's comments. Will work on replacing IndexOfArrayTest with ExpressionTestCase tomorrow

@alinaliBQ alinaliBQ left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@danielfrankcom finished addressing comments. Used constants where applicable

alinaliBQ added 20 commits July 9, 2026 14:38
Co-authored-by: Leszek Kurzyna <lkurzyna@amazon.com>
Co-authored-by: Sean Oczkowski <seoc@amazon.com>

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
 Moved BOUNDARY_INDEX_TESTS (4 success cases) and NEGATIVE_ZERO_START_TESTS
   (3 success cases) from test_expression_indexOfArray_errors.py →
  test_expression_indexOfArray_core_behavior.py

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
@alinaliBQ alinaliBQ force-pushed the filter-in-indexOfArray-isArray branch from 9dfe1a0 to 1229d4f Compare July 9, 2026 21:39
@alinaliBQ

Copy link
Copy Markdown
Contributor Author

will work on the CI failures

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
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.

Add compatibility test for $filter

3 participants