Skip to content

Add $dateAdd, $dateSubtract, $dateDiff, $dateTrunc tests#674

Open
danielfrankcom wants to merge 5 commits into
documentdb:mainfrom
danielfrankcom:pr/date-math
Open

Add $dateAdd, $dateSubtract, $dateDiff, $dateTrunc tests#674
danielfrankcom wants to merge 5 commits into
documentdb:mainfrom
danielfrankcom:pr/date-math

Conversation

@danielfrankcom

Copy link
Copy Markdown
Collaborator

This change adds tests for the $dateAdd, $dateSubtract, $dateDiff, and $dateTrunc expressions. They were originally authored by @mitchell-elholm.

Closes #304, #305, #308, #311

danielfrankcom and others added 4 commits July 9, 2026 13:47
This change adds tests for the $dateAdd expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#304

Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
This change adds tests for the $dateDiff expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#305

Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
This change adds tests for the $dateSubtract expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#308

Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
This change adds tests for the $dateTrunc expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#311

Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner July 9, 2026 20:52
@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 Needs Review
Confidence: 0.90 (mixed)

Reasoning

component from path globs (test-coverage); effort from diff stats (7523+0 LOC, 25 files); LLM: Adds new test cases for four date-related aggregation expressions, expanding compatibility test coverage across multiple files in one component.

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.

@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jul 9, 2026
Splits the $dateAdd, $dateSubtract, $dateDiff, and $dateTrunc test files
into smaller files grouped by property theme, and separates success cases
from rejection (error) cases into dedicated files, per review feedback on
documentdb#674. No test cases are added, removed, or changed; blocks are moved
verbatim and parametrized IDs are preserved.

The 885-line test_dateTrunc_basic.py and the other oversized mixed
success/error files are replaced by cohesive per-theme files (arithmetic,
calendar, timezone, input types, errors, etc.).

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>

@alinaliBQ alinaliBQ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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 $dateAdd

2 participants