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

round() with a precision read from data below 0 gives a value, where Neo4j fails

Cerrado
#148 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
54/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgres, postgresql, python, sqlite

Línea de trabajo

Read the existing round handling and per-store expression code, then compare it with the referenced drivine4j fix and its CypherQueryCrossEngineTest cases. Port the failure expression for each supported store and guard precision values read from rows; update the spec to v0.6.4. Done when the new spec case and the ported cross-engine cases pass, including the WHERE, aggregate, filtered-row, and compiler-constant cases.

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

Descripción

bug

Port of liberation-data/drivine4j#265 (PR liberation-data/drivine4j#275).

Neo4j fails round(x, p) when p, read from a row, is below 0 (22N03). A written or bound precision is refused when compiling (once #120 lands). One read from data can't be, and Postgres, Oracle and SQLite give a value instead: 1200 for round(1234.5, -2), or 1235 on SQLite, whose ROUND reads a negative precision as 0.

The fix in drivine4j:

  • A failure(message, value) per store: an expression that fails the statement when it is worked out. It reads the row's value, so the store can't work it out ahead.
    • Postgres: a cast of text to an integer.
    • Oracle: TO_NUMBER of text.
    • SQLite: a registered drivine_fail.
  • round()'s precision from data is guarded: CASE WHEN TRUNC(p) < 0 THEN <failure> ELSE CAST(TRUNC(p) AS INTEGER) END.

Port it, and move to spec v0.6.4, whose round case reads a precision from data. drivine4j's CypherQueryCrossEngineTest round tests are also worth porting. They cover a WHERE, an aggregate, a filtered row, and constants the compiler doesn't read as given.

This follows #120, the port of drivine4j#233.

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

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.