cqframework / cqframework/cql-execution

Improve consistency of equality between objects

Open
#279 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
84
Forks
38
Avg merge
1d 20h
Merged PRs (30d)
1

Description

In the current implementation, equality of data types (e.g., Quantity, Date, DateTime, etc) can be determined in multiple ways:

  1. a.equals(b)
  2. b.equals(a)
  3. equals(a, b) (and perhaps also equals(b, a))

When PR #278 is merged, it will introduce another way:

  1. Immutable.is(a, b)

The results of these operations may differ depending on which one you call and which data types are passed in. This should not be the case, as all equality operations should be consistent and commutative. Ideally, they should all be backed by the same implementation.

For additional discussion, see: https://github.com/cqframework/cql-execution/pull/278#discussion_r988040642.

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

No files or tests are named. Start by reviewing the equality entry points described in the issue—equals methods, the equals helper, and Immutable.is—and read the discussion on PR #278. Done should mean these operations produce consistent, commutative results across the listed data types, with coverage for their combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.