`<=`, `>=` and `>` give wrong results for missing values and for booleans

Aperta
#45 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Start by reading the comparison handling for <=, >=, and > and the tests for JSONPath filters; the issue does not name file paths, so locate those entry points in the Go repository. Check the missing-value and boolean cases against the RFC and jsonpath-rfc9535 results described here. Done means the two examples return [{}] and [] respectively, with regression tests covering both.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Two comparison cases come out wrong:

  • $[[email protected] <= @.b] on [{}] returns []. Both sides are missing, and missing equals missing, so <= should hold and
    it should return [{}]. >= has the same problem.
  • $[?true > false] on [1] returns [1]. Booleans aren't ordered by <, and true isn't equal to false, so >
    should be false and it should return [].

The RFC defines <= as "less-than or equal", with < defined only for two numbers or two strings, and equality of two
missing values being true. jsonpath-rfc9535 gives the expected results on both.

Lingua principale
Go
Stelle
41
Fork
4
Merge medio
2g 8h
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di theory/jsonpath

Tutte le issue di theory/jsonpath

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.