Skip to content

Add $dateFromParts, $dateFromString, $dateToParts, $dateToString tests#678

Open
danielfrankcom wants to merge 6 commits into
documentdb:mainfrom
danielfrankcom:pr/date-conversion
Open

Add $dateFromParts, $dateFromString, $dateToParts, $dateToString tests#678
danielfrankcom wants to merge 6 commits into
documentdb:mainfrom
danielfrankcom:pr/date-conversion

Conversation

@danielfrankcom

Copy link
Copy Markdown
Collaborator

This change adds tests for the $dateFromParts, $dateFromString, $dateToParts, and $dateToString expressions. The tests were originally authored by @mitchell-elholm.

Closes #306, #307, #309, #310

danielfrankcom and others added 4 commits July 10, 2026 16:04
This change adds tests for the $dateFromParts expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#306

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 $dateFromString expression, including
cross-operator combination tests that exercise $dateFromString inside other
date operators and $toDate/$convert equivalence. It was originally authored
by @mitchell-elholm.

Closes documentdb#307

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 $dateToParts expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#309

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 $dateToString expression. It was originally
authored by @mitchell-elholm.

Closes documentdb#310

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 10, 2026 23:33
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jul 10, 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 Needs Review
Confidence: 0.90 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (7141+0 LOC, 35 files); LLM: Adds new test coverage for four date-related aggregation expressions, touching the compatibility tests directory with moderate scope 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.

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

@PatersonProjects PatersonProjects 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.

Only thing I can spot is the one duplicate, otherwise LGTM, nice parametrizing

The nested_field_path case duplicated nested_field: both resolve a
two-segment dotted path into a one-level nested object holding a date
string, expecting the same parsed date. Only the field names differed,
so it added no coverage.

Signed-off-by: Daniel Frankcom <frankcom@amazon.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 $dateFromParts

2 participants