Skip to content

feat(cypher): reject known incompatible expression types - #52

Merged
prrao87 merged 1 commit into
codex/issue-23-expression-types-basefrom
codex/issue-23-expression-types
Oct 26, 2026
Merged

prrao87 merged 1 commit into
codex/issue-23-expression-types-basefrom
codex/issue-23-expression-types

Conversation

@stugorf

@stugorf stugorf commented Oct 26, 2026

Copy link
Copy Markdown
Member

Problem and change

Uses catalog schemas and the existing semantic scopes to validate arithmetic and comparisons before execution. Errors identify the expression and operand types, surfacing as Python ValueError. Supported numeric promotion, null operands and temporal combinations remain valid; unresolved types are left to execution rather than rejected speculatively.

The Cypher guide and API reference describe the validation. Real Arrow-schema regressions cover numeric/temporal compatibility, established mismatches, alias/WITH scope propagation and nulls. This submission stacks the compatible mapping accessors; privacy and validated deserialization remain staged for the next breaking release.

Validation

Head 1939b6948792ed84eecd0914ff413da792ac2875; frozen parent 96598edac33e9c8dab8bf3b0ec1324308faf589e. Focused checks and regression details record commands, results, documentation and compatibility. The release receipt pins wheel/archive identity and 16 installed tests.

Both complete workloads pass unchanged goldens in memory and lazy modes. Retained first-pass geometric mean speedups are below (greater than one is faster). Per-query results and paired investigations remain in the audit archive.

Workload/mode Main Actual parent
Q30 memory 0.964 0.985
Q30 lazy 0.944 1.006
IC memory 0.990 1.040
IC lazy 1.005 0.987

Measurements use the same Apple M4 Max (16 cores, 128 GiB), macOS 26.6.2 arm64 and Python 3.13.17, with Q30 revision 6260689 and IC revision c185123. Reproduction instructions pin settings, data checksums, locks and commands. The frozen main baseline is code-identical to current main 90114f3; the equivalence check also verifies clean prospective main-target merges.

Individual review gates pass under the recorded repeat/controlled-investigation rules. Initial failed measurements remain intact in the audit record.

User impact

Schema-aware arithmetic/comparison validation preserves supported null/numeric/temporal coercions and rejects established mismatches with operand types and expression context. Python errors and scope propagation are tested; guides/examples are updated.

Review ledger · Current contribution guide

Audit archive: 47,675,190 bytes; SHA-256 b3486fb30a34639c830b5d49353b3838f96369f95df959ac35f85511f7f8b2de. The small current-main supplement preserves the documentation update. Original absolute paths in receipts map to included records through the archive index.

Submitted by David Hughes (@stugorf), with AI Collaboration.

Use catalog schemas and scoped aliases to diagnose incompatible operands before planning. Preserve numeric and temporal coercions and defer unknown types to DataFusion. Add Rust semantic and Python execution coverage.

Part of #23. Implemented with assistance from Codex; runtime tests queued and benchmark validation pending.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying lance-csr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1939b69
Status: ✅  Deploy successful!
Preview URL: https://8e1450de.lance-csr.pages.dev
Branch Preview URL: https://codex-issue-23-expression-ty.lance-csr.pages.dev

View logs

@prrao87
prrao87 changed the base branch from codex/issue-23-config-accessors to codex/issue-23-expression-types-base October 26, 2026 16:49
@prrao87
prrao87 marked this pull request as ready for review October 26, 2026 16:49
@prrao87
prrao87 merged commit 628bbde into codex/issue-23-expression-types-base Oct 26, 2026
8 checks passed
@prrao87
prrao87 deleted the codex/issue-23-expression-types branch October 26, 2026 16:54
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.

2 participants