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

Oracle: a coalesce of a list of temporal values, or a list of lists or maps of them, still reads through JSON_TABLE and stalls the parse (port of drivine4j#347)

Cerrado
#219 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #222 de @jasperblues — fusionado

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
database

Línea de trabajo

Start in drivine/cypher/sql/sql_cypher_compiler.py, especially _holds_temporals, coalesce, and the list-kind tracking around the cited lines. Read the ported drivine4j fix and inspect the named Oracle tests and CypherQueryContract for expected SQL and behavior. Done when temporal lists of the described shapes avoid JSON_TABLE, non-temporal lists still use it, and the guarded Oracle runs complete within 10 seconds.

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

Descripción

Port of liberation-data/drivine4j#347.

Once #217 (the port of drivine4j#331) merges, Oracle reads a list by its places only where the compiler knows its items, or their items, are temporal values (_holds_temporals, drivine/cypher/sql/sql_cypher_compiler.py:5640 on oracle-parse-hang). It loses track in two places, and those lists still go to JSON_TABLE, whose parse over a list worked out with temporal arithmetic stalls the session:

  • coalesce(l, []): coalesce (sql_cypher_compiler.py:4579) builds its result with only temporal, not items/item_items.
  • Three levels deep, or maps: item_items tracks kinds two levels down, so collect(DISTINCT [l, l]), collect(DISTINCT [x IN l | [x]]), collect(DISTINCT [x IN l | {t: x}]) and UNWIND [x IN l | {t: x}] AS m go to JSON_TABLE.

On Oracle 23.26, drivine4j measured 42 s for the coalesce, 43–106 s for the three-level lists, 105 s and over 120 s for the lists of maps. The results are right; only the parse is slow.

The fix in drivine4j (liberation-data/drivine4j#353): a compiled JSON value carries temporals, which says it holds a temporal value the statement makes at any depth. It is set by list and map literals, map projections, comprehensions, collect, CASE, coalesce, + and UNION. It is passed on by items, slices, map properties, WITH, reverse, tail, head, last, min and max. _holds_temporals also checks it, so Oracle reads such a list by its places. coalesce now also gives the items/item_items its arguments agree on, ignoring a written null or empty list (listKindOf in drivine4j). _item_kind_of ignores a written empty list too. Lists of other values keep JSON_TABLE, and Postgres and SQLite compile to the same SQL.

Tests to port:

  • OracleZonedListSortTest: SQL-shape checks for the coalesce, deep and map statements, and for non-temporal lists that keep JSON_TABLE.
  • OracleZonedListSortRunTest: the same statements run under its 10 s kill-and-abort guard.
  • CypherQueryContract: "a coalesce of a list of temporal values worked out on each row, and lists or maps that hold such a list deeper, read item by item".
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.