Skip to content

fix(gfql): preserve CASE value families - #2354

Draft
lmeyerov wants to merge 4 commits into
masterfrom
fix/gfql-case-value-families-2330
Draft

lmeyerov wants to merge 4 commits into
masterfrom
fix/gfql-case-value-families-2330

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Generalization

CASE no longer silently coerces incompatible Cypher value families. Pandas preserves mixed branch values in an object column. Polars and cuDF raise one structured unsupported-operation error before branch materialization, with the detected families and a cast suggestion. Numeric integer/float branches retain their common-type behavior.

Cross-engine incl polars-gpu

  • Tests parametrize pandas, cuDF, Polars, and polars-gpu.
  • The Polars native lowering detects boolean/number and number/string mismatches before when/then/otherwise.
  • The pandas/cuDF row evaluator uses the same family boundary; pandas preserves values while cuDF declines incompatible families.
  • A numeric int/float control proves valid numeric conforming behavior remains unchanged.

Cross-platform and version

  • Exact head: 488eddb83d160d40c3733d460e2daf86fc68201c.
  • Exact tree: d5fbb6ad459750439b0070bff1bde93b15969f5b.
  • Full diff SHA-256: 52fbc63a58b377d4406a2b3628a237647fb4242136fc1da2cf35457c51188a98.
  • Master red proof: two Polars mixed-family controls silently coerced before repair.
  • Desktop focused CASE/lowering scope: 82 passed, 21 skipped, 0 failed; CASE module: 8 passed, 0 failed.
  • Polars lane-completeness: 13 passed, 0 failed.
  • A related two-file desktop run has 20 cuDF cudaErrorNoDevice failures, exactly matching the master failure set; this is environment debt, not candidate delta.
  • Ruff, diff checks, debug sweep, and credential sweep pass.
  • Mypy remains at the master baseline: 18 diagnostics with an identical normalized set.
  • Exact-head CI run 44220785428 and CodeQL run 44220785562 are terminal green, including changed-line coverage and TCK. The one prior full-AI failure was a Torch download timeout; its failed-job rerun passed.
  • Actual cuDF, polars-gpu, and RAPIDS 25.02/26.02 validation remain pending. The DRAFT is not ready for merge.

Tests

  • New tests are red-first on Polars and compare pandas mixed-value oracles with structured E110 declines.
  • Controls cover bool/number, number/string, valid numeric conformity, and the legacy all-null branch retry.
  • The new engine-parametrized module is registered in the Polars lane.

Hygiene

  • Mypy has zero diagnostic delta versus master.
  • Ruff and git diff --check pass.
  • No broad exception handling is added.
  • CHANGELOG documents the user-visible Cypher behavior.

Size

  • One read-side expression topic: CASE branch value-family fidelity.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant