cqframework / cqframework/cql-tests

Wrong Expected Outcome for Sort with Duplicate Elements

Open
#71 6 comments 0 reactions 1 assignee View on GitHub

@raleigh-g-thompson is already working on this.

Since Oct 1, 2025.

bug CQLTest: CQL-Spec-Change CQLTest: CQL-test-code
Dominant language
No language data
Stars
7
Forks
8
Avg merge
12d 5h
Merged PRs (30d)
2

Description

The test CqlListOperatorsTest.Sort.simpleSortAsc specifies the following CQL:

({4, 5, 1, 6, 2, 1}) sL sort asc

and expected result {1, 1, 2, 4, 5, 6}.

Similarly, the test CqlListOperatorsTest.Sort.simpleSortDesc specifies the following CQL:

({4, 5, 1, 6, 2, 1}) sL sort desc

and expected result {6, 5, 4, 2, 1, 1}.

These are both incorrect since the CQL spec says:

By default, a query returns a list of distinct results, suppressing duplicates.

As such, the expected outputs should be {1, 2, 4, 5, 6} and {6, 5, 4, 2, 1} respectively. Either updated the expected outcomes or add the all keyword to the queries so that duplicates are not suppressed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.