GFQL Cypher: numeric operator conformance + expression-lane typing (round-004 umbrella)

Aperta
#1,900 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
pandas, python
Ambito
backend, data

Direzione di ricerca

Start with the probe report in scratchpad probe-expr/ and the cited comments in lazy/engine/polars/row_pipeline.py:90 and row_pipeline.py:1353; compare the column arithmetic path with literal constant-folding behavior. The issue lists several independent conformance gaps and leaves one behavior awaiting a decision, so first confirm which finding is in scope. Done means the selected behavior matches the stated openCypher expectation and is covered by probes for both engines.

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

Descrizione

Round-004 expression/predicate probe (~85 hand-oracled queries × both engines @ d044e3e84). Headline: TVL/null core is FULLY conformant (full AND/OR/XOR truth table, IN-list nulls, string predicates, ORDER BY null placement); debt concentrates in numerics — findings 1-3 share one root: column arithmetic lowers to raw pandas/polars ops without the Cypher numeric-tower wrap the const-folder applies to literals.

SILENT-WRONG (both engines):

  1. Modulo is Python-floored, openCypher is truncated: -7 % 3 → 2 (oc -1); column path identical; breadcrumb comment at lazy/engine/polars/row_pipeline.py:90 confirms the known gap.
  2. Column int division is true-division: n.rank / 2 (int64) → floats; literal 5 / 2 → 2 correctly (const-folder toInteger wrap) — only the column lane skips it.
  3. Column int div-by-zero → inf silently; openCypher mandates error.
  4. Simple CASE WHEN null matches null subjects (deliberate per row/pipeline.py:1353 comment, but contradicts openCypher/Neo4j: simple CASE uses '=', null never matches).
  5. bool-vs-int comparison coerces (WHERE n.flag > 0 matches) instead of null semantics; the numeric-vs-string guard exists but bool-vs-int slips past.

Typed gaps / form defects: missing property in WHERE is GFQLSchemaError (makes IS NULL unusable for schema-optional props; RETURN n.absent correctly nulls); ORDER BY restricted to projected columns; col-vs-col STARTS WITH raises RAW ValueError (untyped); 1 + null pandas typed-errors while polars correctly nulls (parity broken in the conforming direction); toInteger('x1') errors vs null; select-lane errors all mislabeled invalid-node-reference. Entity fns labels()/properties() return display strings not structured values.

Swept clean: extensive TVL/string/CASE/ORDER-BY/SKIP-LIMIT inventory in probe report (scratchpad probe-expr/). Fix order: 1-3 (one numeric-tower root) → 5 → 4 (needs decision: keep documented deviation or conform) → error-typing polish.

Lingua principale
Python
Stelle
2.6k
Fork
229
Merge medio
1g 5h
PR unite (30g)
99

Preparare l'ambiente

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 graphistry/pygraphistry

Tutte le issue di graphistry/pygraphistry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.