Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Fermée
#148 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
54/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
postgres, postgresql, python, sqlite
Domaine
backend, databases

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Python
Étoiles
1
Forks
0
Merge moyen
1 h 19 min
PR mergées (30 j)
122

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de liberation-data/drivine-python

Toutes les issues de liberation-data/drivine-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.