Compiled Cypher: a sort key beside a variable-length walk is written at every level, compiling to megabytes
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
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
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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de liberation-data/drivine-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liberation-data/drivine-python#250 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
liberation-data/drivine-python#209 ·
Los mantenedores suelen responder en 1 día
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select themAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
liberation-data/drivine-python#178 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
liberation-data/drivine-python#280 ·
Los mantenedores suelen responder en 1 día
-
Read a list item past 32 KB by its place on Oracle without crashing the session over two rowsAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
liberation-data/drivine-python#279 ·
Los mantenedores suelen responder en 1 día
Todos los issues de liberation-data/drivine-python
Issues similares
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Git-Hospital/githealthcheck#61 ·
Los mantenedores suelen responder en 1 día
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ramnes/notion-sdk-py#433 ·
-
Partial method descriptors raise on class accessPosiblemente ocupada @Gambit-Checkmate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 19 días
-
docs pkg:core
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
pydantic/pydantic-ai#11929 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
intake/intake-esm#789 ·