Skip to content

fix(gfql): support exponentiation operator - #2356

Draft
lmeyerov wants to merge 5 commits into
masterfrom
fix/gfql-power-operator
Draft

lmeyerov wants to merge 5 commits into
masterfrom
fix/gfql-power-operator

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Generalization

GFQL Cypher now supports numeric exponentiation with ^. Power binds between multiplication and unary operands as pinned by TCK, including 4 ^ 3 * 2 ^ 3, right-parenthesized chains, and -3 ^ 2 == 9.

Cross-engine incl polars-gpu

  • Tests parametrize pandas, cuDF, Polars, and polars-gpu.
  • pandas/cuDF row evaluation converts numeric operands to float before exponentiation.
  • Native Polars lowers numeric power in Float64 and declines boolean/cross-type operands.
  • Null propagates; nonzero/zero and unary/parenthesized precedence controls are pinned.

Cross-platform and version

  • Exact product head: 397faa2d4c11c5a7cafa1a910dc44e84893057d9.
  • Exact tree: de6539e9824477136f9b73e8e87b08c59f6adf25.
  • Product diff SHA-256: adef960d03c3d08f919fbad73ca3b1a95f1de0a6844d60c4cc66bb4033d910a4.
  • Paired TCK: test(tck): promote power precedence scenarios tck-gfql#222 at 20457c23110aa6c3399e44ea30d1827e60cc8ddb.
  • Paired TCK diff SHA-256: 88c48d9c6916520bd43ddf0cce8f406c58c60a573c155e61bd443c8a628f8e23.
  • Master red proof: all ^ probes failed Cypher syntax before repair.
  • Focused product scope: 16 engine/precedence cases passed; grammar/differential parity: 15 passed.
  • Full paired TCK: 3,872 passed, 6 skipped, 686 xfailed, 0 failed.
  • Polars lane-completeness: 13 passed; Ruff, diff checks, type hygiene, debug sweep, and credential sweep pass.
  • Mypy remains at the master baseline: 18 diagnostics with an identical normalized set.
  • Exact-head CI run 44240589902 and CodeQL run 44240589704 are green, including paired TCK, route modes, Polars lanes, and coverage.
  • 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 because every ^ shape was a syntax error on master.
  • Six TCK precedence rows cover multiplication, division, modulo, addition, subtraction, and unary/parenthesized forms.
  • Grammar corpus includes power precedence and is covered by ambiguity plus LALR/Earley differential tests.
  • The engine-parametrized module is registered in the Polars lane.

Hygiene

  • Mypy has zero diagnostic delta versus master.
  • Type-hygiene guard reports no growth.
  • Ruff and git diff --check pass.
  • CHANGELOG documents the user-visible Cypher operator.

Size

  • One read-side numeric-expression topic: exponentiation grammar and execution.

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