run_cypher binds empty list and object params differently on Kuzu

Aperta
#396 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

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
python, typescript

Direzione di ricerca

Start with _run parameter binding in src/selfgraph/stores/kuzu.py and typescript/src/stores/kuzu.ts, then compare how each SDK passes empty lists and objects to Kuzu. Reproduce with the RETURN $x AS x examples in the issue. Done when both SDKs return the same value without losing it, or reject it with invalid_argument naming the parameter.

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

Descrizione

approved-for-pr area: parity area: store bug effort: S P3 store: kuzu

What happens

On Kuzu, run_cypher binds an empty list or empty object parameter differently in each SDK:

Query Params Python TypeScript
RETURN $x AS x {"x": []} query_failed: Kuzu query failed: Runtime exception: Trying to a create a vector with ANY type. This should not happen. Data type is expected to be resolved during binding. {"x": null}
RETURN $x AS x {"x": {}} {"x": {}} {"x": null}

So Python fails on a valid JSON parameter with an internal Kuzu error, and TypeScript silently turns both values into null.

Reproduce

On 04862c4, with a Kuzu graph g:

await g.run_cypher("RETURN $x AS x", {"x": []})   # raises query_failed
await g.run_cypher("RETURN $x AS x", {"x": {}})   # rows [{"x": {}}]
await g.runCypher("RETURN $x AS x", { x: [] });   // rows [{ x: null }]
await g.runCypher("RETURN $x AS x", { x: {} });   // rows [{ x: null }]

The MCP run_cypher tool and CLI query --param x=[] show the same split.

Expected

The same result in both SDKs, without losing the value. Either bind empty lists and maps with a type Kuzu can resolve, or reject them with invalid_argument naming the parameter.

Where

  • src/selfgraph/stores/kuzu.py, _run parameter binding
  • typescript/src/stores/kuzu.ts, _run parameter binding
Lingua principale
TypeScript
Stelle
173
Fork
58
Merge medio
6h
PR unite (30g)
120

Preparare l'ambiente

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 hydra-db/selfgraph

Tutte le issue di hydra-db/selfgraph

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.