Repository navigation
Add Cypher string and list scalar functions - #43
Merged
prrao87 merged 6 commits intoOct 26, 2026
Merged
Conversation
Implement the separate string/list submission for #20 on the numeric-function prerequisite. Add Unicode string operations, list extraction/reversal, outer list size, stepped ranges, strict argument kinds, and empty quoted literals. Update the unsupported-function regression now that replace is supported. Validation: Python static checks, formatting, strict docs, and spelling pass. Exact-source Rust and Python runtime checks are pending and tracked separately; old combined-source evidence is preserved. Submitted by David Hughes (@stugorf), with AI Collaboration.
Return an error when an Arrow UInt64 range endpoint or step exceeds Int64 instead of silently converting it to null. Preserve actual null arguments. Add Rust and CSR/join Python regressions and document the boundary.
Translate Cypher list size and inclusive range wrappers into faithful native SQL expressions before applying the inherited registry guard. Add string/null and List/LargeList/FixedSizeList SQL coverage and document runtime-only string exports. Submitted by David Hughes (@stugorf), with AI Collaboration.
Compare real Cypher and SqlEngine results for null string/list functions and typed empty-list extraction, preserving exact Arrow output types after constant folding. Submitted by David Hughes (@stugorf), with AI Collaboration.
prrao87
marked this pull request as ready for review
October 26, 2026 16:49
* feat(cypher): add map and entity keys with node labels Implement keys for maps and exposed entity property columns, preserving null map fields while omitting absent entity properties. Resolve labels from canonical configured node bindings and preserve optional nulls and WITH aliases. Reject mixed-label bindings explicitly. Validation: 344 Rust library tests, 32 focused Python cases, all 615 Python tests, workspace all-target clippy, Python lint, executable documentation, strict docs build, spelling, formatting, and whitespace checks pass. Part of #20; mixed-label labels() remains an explicit engine boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add ordered reduce and list predicates (#45) * feat(cypher): add ordered reduce and list predicates Part of #20. Keep fold variables local, preserve list order and null semantics, and correlate graph predicates with iterator bindings. Document supported forms and explicit body limits. * docs(cypher): explain list fold AST migration Document the exhaustive-match and local-scope requirements for Rust consumers of the new fold expression variants. Submitted by David Hughes (@stugorf), with AI Collaboration.
Resolve all RETURN expressions before applying scalar aliases to the ORDER BY binding scope. Preserve whole-node projection behavior. Add focused planner and CSR/join Python regressions for issue #21. Document alias scope in the Cypher guide. Validation: Rust formatting, Python lint, strict docs build, spelling, and whitespace checks pass. Published 0.2.0 reproduction: 14 failures, 4 existing passes. Current-source runtime tests remain pending the coordinated build. Implemented by David Hughes with assistance from Codex.
prrao87
pushed a commit
that referenced
this pull request
Oct 26, 2026
* feat(cypher): add numeric scalar functions Implement the math-function submission for #20. Reuse DataFusion kernels for abs, floor, ceil, and sqrt; enforce numeric arguments and Cypher rounding ties, nulls, return types, and overflow errors. Document the finite supported signatures with executable examples. Validation: 343 Rust library tests and Python static checks pass. Exact-source Python runtime checks and workspace clippy are in progress; release evidence is tracked separately. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover non-finite Arrow math inputs Exercise infinity and NaN through Arrow columns while preserving the existing rejection of non-finite parameter values. Document out-of-range unsigned input errors. Validation: 343 Rust library tests, workspace all-target clippy, 96 focused and 548 total Python tests, Python static checks, strict docs, spelling, and executable documentation pass. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): guard math SQL export semantics Reject runtime-only scalar implementations after constant folding instead of exporting same-named SQL functions with different Cypher values or types. Preserve native SQL functions, document NotImplementedError, and test real math SQL comparisons. Submitted by David Hughes (@stugorf), with AI Collaboration. * docs(cypher): clarify unsigned math conversion Limit the Int64 overflow restriction to integer abs. The remaining math functions convert numeric values, including UInt64, to Float64; cover those Arrow inputs with real execution tests. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): preserve typed nulls in SQL export Use DataFusion arrow_cast after constant folding so typed nulls retain their Arrow result types. Preserve untyped nulls and reject typed-null export to other dialects. Verify real SQL/Cypher round trips and document the boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add Cypher string and list scalar functions (#43) * feat(cypher): add string and list scalar functions Implement the separate string/list submission for #20 on the numeric-function prerequisite. Add Unicode string operations, list extraction/reversal, outer list size, stepped ranges, strict argument kinds, and empty quoted literals. Update the unsupported-function regression now that replace is supported. Validation: Python static checks, formatting, strict docs, and spelling pass. Exact-source Rust and Python runtime checks are pending and tracked separately; old combined-source evidence is preserved. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): reject unsigned range argument overflow Return an error when an Arrow UInt64 range endpoint or step exceeds Int64 instead of silently converting it to null. Preserve actual null arguments. Add Rust and CSR/join Python regressions and document the boundary. * fix(cypher): preserve native list SQL exports Translate Cypher list size and inclusive range wrappers into faithful native SQL expressions before applying the inherited registry guard. Add string/null and List/LargeList/FixedSizeList SQL coverage and document runtime-only string exports. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover null string and list SQL types Compare real Cypher and SqlEngine results for null string/list functions and typed empty-list extraction, preserving exact Arrow output types after constant folding. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add map/entity keys and node labels (#44) * feat(cypher): add map and entity keys with node labels Implement keys for maps and exposed entity property columns, preserving null map fields while omitting absent entity properties. Resolve labels from canonical configured node bindings and preserve optional nulls and WITH aliases. Reject mixed-label bindings explicitly. Validation: 344 Rust library tests, 32 focused Python cases, all 615 Python tests, workspace all-target clippy, Python lint, executable documentation, strict docs build, spelling, formatting, and whitespace checks pass. Part of #20; mixed-label labels() remains an explicit engine boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add ordered reduce and list predicates (#45) * feat(cypher): add ordered reduce and list predicates Part of #20. Keep fold variables local, preserve list order and null semantics, and correlate graph predicates with iterator bindings. Document supported forms and explicit body limits. * docs(cypher): explain list fold AST migration Document the exhaustive-match and local-scope requirements for Rust consumers of the new fold expression variants. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(query): resolve shadowing output aliases in sort (#49) Resolve all RETURN expressions before applying scalar aliases to the ORDER BY binding scope. Preserve whole-node projection behavior. Add focused planner and CSR/join Python regressions for issue #21. Document alias scope in the Cypher guide. Validation: Rust formatting, Python lint, strict docs build, spelling, and whitespace checks pass. Published 0.2.0 reproduction: 14 failures, 4 existing passes. Current-source runtime tests remain pending the coordinated build. Implemented by David Hughes with assistance from Codex.
prrao87
pushed a commit
that referenced
this pull request
Oct 26, 2026
* feat(cypher): bind parameters in skip and limit Resolve literal-or-parameter row counts before logical planning, including chained WITH limits. Reject invalid counts without truncation or wraparound. Part of #20. Implemented with assistance from Codex; coordinated runtime and benchmark checks pending. * docs(cypher): explain the pagination AST migration Document literal and parameter RowCount construction for Rust consumers without changing the Python signatures. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add numeric scalar functions with strict Cypher types (#42) * feat(cypher): add numeric scalar functions Implement the math-function submission for #20. Reuse DataFusion kernels for abs, floor, ceil, and sqrt; enforce numeric arguments and Cypher rounding ties, nulls, return types, and overflow errors. Document the finite supported signatures with executable examples. Validation: 343 Rust library tests and Python static checks pass. Exact-source Python runtime checks and workspace clippy are in progress; release evidence is tracked separately. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover non-finite Arrow math inputs Exercise infinity and NaN through Arrow columns while preserving the existing rejection of non-finite parameter values. Document out-of-range unsigned input errors. Validation: 343 Rust library tests, workspace all-target clippy, 96 focused and 548 total Python tests, Python static checks, strict docs, spelling, and executable documentation pass. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): guard math SQL export semantics Reject runtime-only scalar implementations after constant folding instead of exporting same-named SQL functions with different Cypher values or types. Preserve native SQL functions, document NotImplementedError, and test real math SQL comparisons. Submitted by David Hughes (@stugorf), with AI Collaboration. * docs(cypher): clarify unsigned math conversion Limit the Int64 overflow restriction to integer abs. The remaining math functions convert numeric values, including UInt64, to Float64; cover those Arrow inputs with real execution tests. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): preserve typed nulls in SQL export Use DataFusion arrow_cast after constant folding so typed nulls retain their Arrow result types. Preserve untyped nulls and reject typed-null export to other dialects. Verify real SQL/Cypher round trips and document the boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add Cypher string and list scalar functions (#43) * feat(cypher): add string and list scalar functions Implement the separate string/list submission for #20 on the numeric-function prerequisite. Add Unicode string operations, list extraction/reversal, outer list size, stepped ranges, strict argument kinds, and empty quoted literals. Update the unsupported-function regression now that replace is supported. Validation: Python static checks, formatting, strict docs, and spelling pass. Exact-source Rust and Python runtime checks are pending and tracked separately; old combined-source evidence is preserved. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): reject unsigned range argument overflow Return an error when an Arrow UInt64 range endpoint or step exceeds Int64 instead of silently converting it to null. Preserve actual null arguments. Add Rust and CSR/join Python regressions and document the boundary. * fix(cypher): preserve native list SQL exports Translate Cypher list size and inclusive range wrappers into faithful native SQL expressions before applying the inherited registry guard. Add string/null and List/LargeList/FixedSizeList SQL coverage and document runtime-only string exports. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover null string and list SQL types Compare real Cypher and SqlEngine results for null string/list functions and typed empty-list extraction, preserving exact Arrow output types after constant folding. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add map/entity keys and node labels (#44) * feat(cypher): add map and entity keys with node labels Implement keys for maps and exposed entity property columns, preserving null map fields while omitting absent entity properties. Resolve labels from canonical configured node bindings and preserve optional nulls and WITH aliases. Reject mixed-label bindings explicitly. Validation: 344 Rust library tests, 32 focused Python cases, all 615 Python tests, workspace all-target clippy, Python lint, executable documentation, strict docs build, spelling, formatting, and whitespace checks pass. Part of #20; mixed-label labels() remains an explicit engine boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add ordered reduce and list predicates (#45) * feat(cypher): add ordered reduce and list predicates Part of #20. Keep fold variables local, preserve list order and null semantics, and correlate graph predicates with iterator bindings. Document supported forms and explicit body limits. * docs(cypher): explain list fold AST migration Document the exhaustive-match and local-scope requirements for Rust consumers of the new fold expression variants. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(query): resolve shadowing output aliases in sort (#49) Resolve all RETURN expressions before applying scalar aliases to the ORDER BY binding scope. Preserve whole-node projection behavior. Add focused planner and CSR/join Python regressions for issue #21. Document alias scope in the Cypher guide. Validation: Rust formatting, Python lint, strict docs build, spelling, and whitespace checks pass. Published 0.2.0 reproduction: 14 failures, 4 existing passes. Current-source runtime tests remain pending the coordinated build. Implemented by David Hughes with assistance from Codex.
prrao87
pushed a commit
that referenced
this pull request
Oct 26, 2026
* feat(cypher): support list and map parameters Preserve integer IDs in nested parameter expressions and round-trip containers through CypherQuery.parameters. Validate keys, integer bounds and nesting; document Arrow list coercion. Part of #20; based on #3. Implemented with assistance from Codex. Runtime and benchmark validation pending. * fix(cypher): lower empty maps as empty struct values DataFusion named_struct requires arguments. Use an empty Struct scalar for empty literal and parameter maps. Covered by the container parameter round-trip regression. Part of #20. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(python): type recursive container parameters and results Keep the public stubs and strict consumer examples in the container-parameter submission. Accept nested lists and string-keyed dictionaries, retain recursive result typing, and continue rejecting unsupported sets and arbitrary objects. Validation: make install, all411Python tests, strict Pyright/Ruff, executable docs, strict Zensical and pinned spelling pass. Complete Rust workspace/Clippy verification is running on the unchanged native source. Submitted by David Hughes (@stugorf), with AI Collaboration. * feat(cypher): bind parameters in SKIP and LIMIT (#41) * feat(cypher): bind parameters in skip and limit Resolve literal-or-parameter row counts before logical planning, including chained WITH limits. Reject invalid counts without truncation or wraparound. Part of #20. Implemented with assistance from Codex; coordinated runtime and benchmark checks pending. * docs(cypher): explain the pagination AST migration Document literal and parameter RowCount construction for Rust consumers without changing the Python signatures. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add numeric scalar functions with strict Cypher types (#42) * feat(cypher): add numeric scalar functions Implement the math-function submission for #20. Reuse DataFusion kernels for abs, floor, ceil, and sqrt; enforce numeric arguments and Cypher rounding ties, nulls, return types, and overflow errors. Document the finite supported signatures with executable examples. Validation: 343 Rust library tests and Python static checks pass. Exact-source Python runtime checks and workspace clippy are in progress; release evidence is tracked separately. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover non-finite Arrow math inputs Exercise infinity and NaN through Arrow columns while preserving the existing rejection of non-finite parameter values. Document out-of-range unsigned input errors. Validation: 343 Rust library tests, workspace all-target clippy, 96 focused and 548 total Python tests, Python static checks, strict docs, spelling, and executable documentation pass. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): guard math SQL export semantics Reject runtime-only scalar implementations after constant folding instead of exporting same-named SQL functions with different Cypher values or types. Preserve native SQL functions, document NotImplementedError, and test real math SQL comparisons. Submitted by David Hughes (@stugorf), with AI Collaboration. * docs(cypher): clarify unsigned math conversion Limit the Int64 overflow restriction to integer abs. The remaining math functions convert numeric values, including UInt64, to Float64; cover those Arrow inputs with real execution tests. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): preserve typed nulls in SQL export Use DataFusion arrow_cast after constant folding so typed nulls retain their Arrow result types. Preserve untyped nulls and reject typed-null export to other dialects. Verify real SQL/Cypher round trips and document the boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add Cypher string and list scalar functions (#43) * feat(cypher): add string and list scalar functions Implement the separate string/list submission for #20 on the numeric-function prerequisite. Add Unicode string operations, list extraction/reversal, outer list size, stepped ranges, strict argument kinds, and empty quoted literals. Update the unsupported-function regression now that replace is supported. Validation: Python static checks, formatting, strict docs, and spelling pass. Exact-source Rust and Python runtime checks are pending and tracked separately; old combined-source evidence is preserved. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(cypher): reject unsigned range argument overflow Return an error when an Arrow UInt64 range endpoint or step exceeds Int64 instead of silently converting it to null. Preserve actual null arguments. Add Rust and CSR/join Python regressions and document the boundary. * fix(cypher): preserve native list SQL exports Translate Cypher list size and inclusive range wrappers into faithful native SQL expressions before applying the inherited registry guard. Add string/null and List/LargeList/FixedSizeList SQL coverage and document runtime-only string exports. Submitted by David Hughes (@stugorf), with AI Collaboration. * test(cypher): cover null string and list SQL types Compare real Cypher and SqlEngine results for null string/list functions and typed empty-list extraction, preserving exact Arrow output types after constant folding. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add map/entity keys and node labels (#44) * feat(cypher): add map and entity keys with node labels Implement keys for maps and exposed entity property columns, preserving null map fields while omitting absent entity properties. Resolve labels from canonical configured node bindings and preserve optional nulls and WITH aliases. Reject mixed-label bindings explicitly. Validation: 344 Rust library tests, 32 focused Python cases, all 615 Python tests, workspace all-target clippy, Python lint, executable documentation, strict docs build, spelling, formatting, and whitespace checks pass. Part of #20; mixed-label labels() remains an explicit engine boundary. Submitted by David Hughes (@stugorf), with AI Collaboration. * Add ordered reduce and list predicates (#45) * feat(cypher): add ordered reduce and list predicates Part of #20. Keep fold variables local, preserve list order and null semantics, and correlate graph predicates with iterator bindings. Document supported forms and explicit body limits. * docs(cypher): explain list fold AST migration Document the exhaustive-match and local-scope requirements for Rust consumers of the new fold expression variants. Submitted by David Hughes (@stugorf), with AI Collaboration. * fix(query): resolve shadowing output aliases in sort (#49) Resolve all RETURN expressions before applying scalar aliases to the ORDER BY binding scope. Preserve whole-node projection behavior. Add focused planner and CSR/join Python regressions for issue #21. Document alias scope in the Cypher guide. Validation: Rust formatting, Python lint, strict docs build, spelling, and whitespace checks pass. Published 0.2.0 reproduction: 14 failures, 4 existing passes. Current-source runtime tests remain pending the coordinated build. Implemented by David Hughes with assistance from Codex.
Member
|
This change merged into an intermediate branch, not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
Part of #20. Keep the tracker open for its remaining feature groups.
This submission adds
left,right,substring,replace,split,trim/lTrim/rTrim, string/listreverse,last,tail, outer listsizeand optionalrangesteps. It handles Unicode characters, null/empty inputs and strict argument kinds. Unsigned Arrow range arguments outside Int64 raise an error instead of becoming null.Validation
Head
d44596967609bce35fad34acafe68753a2913383; frozen parentc53f47c2304f09f48019e0d3facdc7ece62c3a83. Focused checks and regression details record commands, results, documentation and compatibility. The release receipt pins wheel/archive identity and 295 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.
Measurements use the same Apple M4 Max (16 cores, 128 GiB), macOS 26.6.2 arm64 and Python 3.13.17, with Q30 revision
6260689and IC revisionc185123. Reproduction instructions pin settings, data checksums, locks and commands. The frozen main baseline is code-identical to current main90114f3; 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
Adds the approved Unicode string/list functions, string size and stepped/descending range behavior. Documentation and deterministic examples cover arguments, nulls and supported shapes.
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.