Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#243 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, sql
Ambito
backend

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Python
Stelle
1
Fork
0
Merge medio
1h 19m
PR unite (30g)
122

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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

Tutte le issue di liberation-data/drivine-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.