Skip to content

Add aggregate function tests. Use CVL for expected output.#41

Merged
brynrhodes merged 3 commits intocqframework:mainfrom
antvaset:aggregate-function-tests
Apr 29, 2025
Merged

Add aggregate function tests. Use CVL for expected output.#41
brynrhodes merged 3 commits intocqframework:mainfrom
antvaset:aggregate-function-tests

Conversation

@antvaset
Copy link
Copy Markdown
Contributor

@antvaset antvaset commented Aug 1, 2024

This PR adds new conformance tests for aggregate functions. I picked all the ones from https://github.com/cqframework/clinical_quality_language/blob/7e91478/Src/java/engine/src/test/resources/org/opencds/cqf/cql/engine/execution/CqlAggregateFunctionsTest.cql which didn't exist yet here.

Using CVL (literals only) for the expected output values, building on top of #29. Focusing only on the tests/cql/CqlAggregateFunctionsTest.xml tests.

Copy link
Copy Markdown
Contributor

@suyashkumar suyashkumar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Just had a couple random comments.

Comment thread tests/cql/CqlAggregateFunctionsTest.xml Outdated
<test name="Product_Long">
<expression>Product({5L, 4L, 5L})</expression>
<output>100L</output>
</test>
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.

should we add other product tests (e.g. for other overloads, null input, etc) or should that come in another PR? (same comment for the other operators)

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.

+1 here if we're going to add this test group we should have a few more edge cases covered

Copy link
Copy Markdown
Contributor

@raleigh-g-thompson raleigh-g-thompson left a comment

Choose a reason for hiding this comment

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

Main branch has changed and there is now a merge conflict. Resolve merge conflict before approval.

@brynrhodes brynrhodes merged commit 3498ee5 into cqframework:main Apr 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants