run_cypher binds empty list and object params differently on Kuzu

Abierto
#396 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
173
Forks
58
Merge medio
6 h
PR fusionados (30 d)
120

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hydra-db/selfgraph

Todos los issues de hydra-db/selfgraph

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.