Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Cypher on SQL stores: a node given by coalesce() or CASE isn't a node, so MATCH (x)-->(d) from it, or labels(x), is refused (port of drivine4j#440)

Abierto
#277 0 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, sql

Línea de trabajo

Start in drivine/cypher/sql/sql_cypher_compiler.py, reading the coalesce handling around line 4830, pattern variable handling around lines 1657 and 2441, and labels() around line 4802. Use TCK Match7 #22 and the two proposed queries from the issue to guide the behavior and tests. Done means node-valued coalesce and CASE expressions work as pattern inputs and with labels(), while a null node used as a pattern matches nothing.

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

Descripción

bug

Port of liberation-data/drivine4j#440.

What happens. A node given by coalesce() or CASE is no longer a node in compiled Cypher. A pattern that starts from it, as in TCK Match7 #22's WITH coalesce(b, c) AS x MATCH (x)-->(d) RETURN d, is refused with "x is not a node, and is used as one in a pattern.", and labels(x) with "labels() takes a node.". Neo4j runs both. x.num works.

Where. coalesce always gives JSON, whatever its arguments (drivine/cypher/sql/sql_cypher_compiler.py:4830). A pattern accepts only a node value for a variable in scope (drivine/cypher/sql/sql_cypher_compiler.py:1657, and :2441 for writes). labels() takes only a node (drivine/cypher/sql/sql_cypher_compiler.py:4802). Read at drivine-python origin/main (7e2998e).

The fix. drivine4j has no fix yet. It proposes that a coalesce or CASE of nodes (or null literals) give a node value whose nid, labels, props and stamp are each the COALESCE or CASE of the arguments' columns, so a pattern from a null node matches nothing.

Tests to port. TCK Match7 #22, and from drivine4j#440: MATCH (a:Single) OPTIONAL MATCH (a)-->(c:NonExistent) WITH coalesce(c, a) AS x MATCH (x)-->(y) RETURN y.num and WITH CASE WHEN true THEN b ELSE a END AS x MATCH (x)-->(d) RETURN labels(d).

Lenguaje dominante
Python
Estrellas
1
Forks
0
Merge medio
1 h 21 min
PR fusionados (30 d)
128

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 liberation-data/drivine-python

Todos los issues de liberation-data/drivine-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.