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

Compiled Cypher: a sort key beside a variable-length walk is written at every level, compiling to megabytes

Abierto
#243 1 comentario 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
58/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, sql
Área
backend

Línea de trabajo

Start in drivine/cypher/sql/sql_cypher_compiler.py at _project's sort-term handling around line 2697, then compare it with _shared_first and the drivine4j#378 fix. Port the corresponding compiled-size test from CompiledSizeTest, plus any cross-engine assertion added upstream. Done means the example no longer expands to megabytes of SQL and the ported tests pass.

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

Descripción

bug

Port of liberation-data/drivine4j#378.

An ORDER BY term that isn't an aggregate, and isn't one of the items, is written out again at every level when it sits beside a variable-length walk. A modest sort key then compiles to megabytes of SQL.

MATCH (a:CyAgg)-[:NEXT*1..2]->(b:CyAgg)
RETURN a.id AS a, b.id AS bb
ORDER BY (datetime(b.at) + duration({minutes: b.m})).minute, a, bb

Compiled size on main (0a3a8be), and on the port of drivine4j#359 for #193, which doesn't change this path:

Store This statement With the sort key worked out in a WITH first
Postgres 2,416,481 characters 13,547
Oracle 5,617,352 characters 13,654

These are the same sizes drivine4j reports.

Where: drivine/cypher/sql/sql_cypher_compiler.py:2697, in _project's sort terms. Beside a walk (select.walks), the order term is compiled through self._unshared(carry), so nothing in it is bound once. This is the same shape as drivine4j#333, which #193 ports through _shared_first. Statements this size failed in drivine4j#333 with ORA-03113 on Oracle. This one hasn't been run against a store yet.

Fix: port the fix for drivine4j#378 once it lands. The likely fix is to work a non-trivial order term out first, in its own WITH *, beside a walk, as _shared_first does for an aggregate's argument.

Tests to port: drivine4j's size case for drivine4j#378 in CompiledSizeTest, and its cross-engine assertion if it adds one.

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.