Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Geschlossen
#148 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
54/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
postgres, postgresql, python, sqlite
Bereich
backend, databases

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
1
Forks
0
Ø Merge
1 Std. 29 Min.
Gemergte PRs (30 T.)
136

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus liberation-data/drivine-python

Alle Issues in liberation-data/drivine-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.