cqframework / cqframework/cql-tests

Incorrect Translation or Incorrect Expected Output for IncludedInNullLeft and IncludesNullRight

Open
#65 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The CqlListOperatorsTest.IncludedIn.IncludedInNullLeft test specifies the following CQL:

null included in {2}

and the expected output null. The CQL Translator, however, translates it as the point/list overload, exporting it as an In operation that therefore should result in false.

The CqlListOperatorsTest.Includes.IncludesNullRight test specifies the following CQL:

{'s', 'a', 'm'} includes null

and the expected result null. The CQL Translator, however, translates it as the list/point overload, exporting it as a Contains operation that therefore should result in false.

That being the case, test engines that execute the CQL based on the CQL Translator's output will fail these tests. I'm not sure which is the best way to resolve this, but it seems there are three choices:

  1. Update the tests to cast the nulls to lists so the translator uses the list/list overloads.
  2. Update the tests to expect false so they are in alignment with the translator's approach.
  3. Update the translator to treat these as interval/interval overloads so it maintains the IncludedIn / Includes operations.

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.

Research direction

Start with CqlListOperatorsTest.xml at the IncludedInNullLeft lines 422-425 and IncludesNullRight lines 379-382, then inspect how the CQL Translator handles these overloads. Determine which interpretation matches the intended CQL behavior, update the tests or translator accordingly, and verify that the affected test engines no longer disagree with the expected results.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.