Left join operator - broken?

Aperta
#540 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
fsharp, postgresql, sqlite
Ambito
databases

Direzione di ricerca

Inizia con il test unitario PostgreSQL collegato e confronta la sua asserzione con il test di left join esistente, in particolare quale lato del join viene verificato. Poi traccia la gestione dell’operatore (!!) e di UseOptionTypes=true nell’intero codice del provider; il lavoro è completato quando l’entità unita tramite left join e le sue colonne sono contrassegnate come opzionali e il test di regressione ha esito positivo.

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

Descrizione

enhancement

( ... Unless I've completely misunderstood how it's supposed to work? ... )

I tried to use a left join in a query and neither the left-joined entity nor its columns are marked as optional. This happens on Postgres, MSSQL, and SQLite, using UseOptionTypes=true.

I thought I mustbe doing something wrong since there was a unit test for left join, but then I noticed that that unit test is wrong: by calling fst it checks the None status of the column in the main table, rather than the left-joined one. The column in the main table happens to be nullable so the test passes.

I added a unit test for PostgreSQL and it does make the build fail.

Diving into the code didn't quite work. I found what I strongly suspect is a bug here, because the compiler treats (!!) as an arbitrary pattern match identifier rather than matching against the actual operator, but changing it to MethodWithName "op_BangBang" didn't fix the test.

I even went back and installed older versions of the library, but couldn't find one where (!!) worked as I expected.

Lingua principale
F#
Stelle
627
Fork
147
Merge medio
2h 2m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 fsprojects/SQLProvider

Tutte le issue di fsprojects/SQLProvider

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.