Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is null
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start at _quantifier() in drivine/cypher/sql/sql_cypher_compiler.py and compare its SQL generation with the described behavior in drivine4j and the cases in drivine-cypher-spec v0.6.7. Check how the generated query handles null predicates and null lists for all four quantifiers. Done means SQL stores match the stated three-valued Cypher semantics.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Port of liberation-data/drivine4j#272.
What happens: on the SQL stores, all(), any(), none() and single() are two-valued where the predicate is null. Cypher's quantifiers are three-valued: a quantifier whose predicate is null for some item, with no item that decides it, is null.
MATCH (n:Person) WHERE none(x IN [1] WHERE n.name IN ['Keanu']) RETURN count(n)
MATCH (n:Person) WHERE all(x IN [1] WHERE n.name = 'x') RETURN count(n)
For a node with no name, Neo4j drops the row, because the quantifier is null. The SQL stores keep it, because NOT EXISTS (… WHERE NOT cond) reads a null cond as true.
Expected: three-valued quantifiers, as drivine4j does since liberation-data/drivine4j#283:
- all(): false if any item is false, else null if any is null, else true;
- any(): true if any is true, else null if any is null, else false;
- none(): the negation of any();
- single(): null when a null item could change the count of true items around one.
drivine4j keeps the cheap EXISTS forms in a WHERE that reads only the truth, where the predicate can't be null. Otherwise it uses one scalar count subquery, mapped to 1/0/NULL and compared = 1, and guards a null list. The cases are in drivine-cypher-spec v0.6.7.
Where: _quantifier() in drivine/cypher/sql/sql_cypher_compiler.py.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 0
- Merge medio
- 1h 16m
- PR unite (30g)
- 74
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
- 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 liberation-data/drivine-python
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
liberation-data/drivine-python#154 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
liberation-data/drivine-python#152 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
liberation-data/drivine-python#150 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
liberation-data/drivine-python#138 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
liberation-data/drivine-python#158 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di liberation-data/drivine-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
UKGovernmentBEIS/optstop#10 ·
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pollen-robotics/reachy_mini#1508 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] `cloud-keys.env` values retain enclosing quotes causing 401 Unauthorized, and missing utf-8 encoding crashes on WindowsForse già presa @divyanshu07-code l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
open-jarvis/OpenJarvis#1192 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sylvainmetayer/homelab#851 ·
I maintainer di solito rispondono entro 1 giorno