Ratio Equal compares the quotient instead of the numerator and denominator
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- backend
Direzione di ricerca
Il bug si trova in Ratio.equals in src/datatypes/ratio.ts, che divide il numeratore per il denominatore e confronta i quozienti. equivalent chiama questo metodo e deve mantenere il confronto dei quozienti. Inizia leggendo questi due metodi e l'helper di uguaglianza di Quantity che dovrebbero usare per numeratore e denominatore. È completato quando 1:8 = 2:16 restituisce false, 1:8 != 2:16 restituisce true e 1:8 ~ 2:16 resta true, verificato aggiungendo test accanto ai test esistenti sui ratio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
1:8 = 2:16 is true, but Equal (1.5.3 and 2.0) says:
For ratios, this means that the numerator and denominator must be the same, using quantity equality semantics.
The spec's own example is define "RatioEqualIsFalse": 1:8 = 2:16. Comparing the quotients is what Equivalent specifies: "For ratios, equivalent means that the numerator and denominator represent the same ratio (e.g. 1:100 ~ 10:1000)".
| Expression | cql-execution | Spec | Java engine 5.8.0 |
|---|---|---|---|
1:8 = 2:16 |
true |
false |
false |
1:8 != 2:16 |
false |
true |
true |
1:8 = 1:8 |
true |
true |
true |
1:8 ~ 2:16 |
true |
true |
true |
Cause
Ratio.equals (src/datatypes/ratio.ts) divides each numerator by its denominator and compares the results, and Ratio.equivalent calls equals. equals should compare numerator with numerator and denominator with denominator, using Quantity equality. equivalent keeps the quotient comparison.
Environment
cql-execution master e8096c6, through test-server (the build has two unrelated Quantity modulo commits on top). The Java engine column is HAPI FHIR 9.0.0 with clinical-reasoning 4.17.0, through $cql.
- Lingua principale
- JavaScript
- Stelle
- 86
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cqframework/cql-execution
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cqframework/cql-execution#410 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cqframework/cql-execution#407 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
cqframework/cql-execution#414 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cqframework/cql-execution#413 ·
-
Length throws TypeError when its null operand is not an As expression (e.g. an expression reference)Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
cqframework/cql-execution#412 ·
Tutte le issue di cqframework/cql-execution
Issue simili
-
Mend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ManageIQ/manageiq-ui-service#2259 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
electerious/Ackee#411 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[bug] 提瓦特记事本原石检测框宽度较窄Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
babalae/bettergi-scripts-list#3905 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 87/100
dedicatedcode/reitti#1445 ·
I maintainer di solito rispondono entro 1 giorno