chore: add tests for the Duration form of the datetime expressions - #814
Merged
zachdaniel merged 1 commit intoAug 14, 2026
Merged
Conversation
Covers `ago/1`, `from_now/1`, `datetime_add/2` and `date_add/2` with a `Duration`, including a multi-unit duration and a negative one, and checks that `date_add` still compares as a date. These pass only with the corresponding ash_sql change; against released ash_sql all six fail with `Unsupported expression`. Part of ash-project#553.
Contributor
|
🚀 Thank you for your contribution! 🚀 |
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
Leave anything that you believe does not apply unchecked.
Summary
Tests only. Covers
ago/1,from_now/1,datetime_add/2anddate_add/2with aDuration, including a multi-unit duration and a negative one, and checks thatdate_addstill compares as a date.These pass only with the corresponding ash_sql change; against released ash_sql they fail with
Unsupported expression. Part of #553Tested with Postgres 19.
Notes
requires ash-project/ash#2844 for
from_now/1requires ash-project/ash_sql#245