cqframework / cqframework/cql-tests
Potentially Wrong Expected Output for ExpandPerHour
@brynrhodes is already working on this.
Since Oct 1, 2025.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 8
- Avg merge
- 12d 5h
- Merged PRs (30d)
- 2
Description
The test CqlIntervalOperatorsTest.Expand.ExpandPerHour specifies the following CQL:
expand { Interval[@T10:00, @T12:30] } per hour
and expected result { Interval[@T10:00, @T11:00), Interval[@T11:00, @T12:00) }.
The CQL specification, however, says:
If the interval boundaries are more precise than the per quantity, the more precise values will be truncated to the precision specified by the per quantity. In these cases, the resulting list of intervals may be more broad than the input range due to this truncation.
It then uses the same exact CQL from the test case above as an example and indicates that the correct answer should be { Interval[@T10, @T10], Interval[@T11, @T11], Interval[@T12, @T12] }.
To be honest, however, I'm not sure if the example is correct since it truncated the inputs by removing minutes precision rather than setting minutes to 0. The spec does not indicate how dates should be truncated (except by example here) -- but it's notable that Interval[@T10, @T10] does not really represent the whole 10 o'clock hour since @T10 is typically interpreted as some time during the 10 o'clock hour.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.