Repository navigation
fix(gfql): handle schema-changing operations in chains - #762
Merged
Merged
Conversation
Fix "Column 'index' not found in edges" error when UMAP or hypergraph
operations are mixed with other GFQL operations in chains.
Implemented recursive dispatch that automatically splits chains at
schema-changer boundaries, executing them as: before → schema_changer → rest.
This ensures schema-changing operations (which create entirely new graph
structures) are properly isolated from regular chain machinery.
Also removed the hypergraph mixing restriction, now allowing queries like:
[n(...), call('hypergraph', {...})]
Changes:
- graphistry/compute/chain.py: Added recursive dispatch logic (lines 372-406)
- graphistry/tests/compute/test_gfql_schema_changers.py: New comprehensive test suite
- graphistry/tests/compute/test_gfql_hypergraph.py: Updated to reflect new behavior
- CHANGELOG.md: Documented fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Import PyGraphistry and alias as CGFull to avoid F821 errors. Fix W504 line break style in test assertions.
lmeyerov
commented
Oct 9, 2025
lmeyerov
commented
Oct 9, 2025
…ma-changers - Add validate_schema check before execute_call() in singleton path - Replace assert with proper GFQLTypeError exception for type checking - Ensures user expectations for validation are honored - Provides structured error messages instead of assertion failures Related to #761 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ndings Create graphistry/tests/compute/gfql/ directory to mirror source structure (following precedent from predicates/ tests). Add comprehensive tests for schema-changing operations (UMAP, hypergraph) in let() bindings: Coverage: - Direct schema-changers in let bindings (execute_call path) - Schema-changers in ASTRef chains (recursive dispatch path) - Nested let() with schema-changers (recursive DAG execution) - Mixed operations: filter → UMAP → hypergraph via refs Tests are marked skip (require full Plotter) but document expected behavior and execution paths for each scenario. Related to #761 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Move test_gfql_schema_changers.py → gfql/test_schema_changers.py (follows new nested structure for GFQL tests) - Update CHANGELOG.md with v0.43.1 release notes - Schema-changers in chains (feature + fix for #761) - validate_schema flag handling - GFQLTypeError exception handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Fixes #761
Summary
Fix "Column 'index' not found in edges" error when UMAP or hypergraph operations are mixed with other GFQL operations in chains.
Implemented recursive dispatch that automatically splits chains at schema-changer boundaries, executing them as:
before → schema_changer → rest. This ensures schema-changing operations (which create entirely new graph structures) are properly isolated from regular chain machinery.Changes
Added
call('umap', {...})mixed with filters and other operations[n(...), call('hypergraph', {...})]Implementation
graphistry/compute/chain.py(lines 372-406): Recursive dispatch logic['umap', 'hypergraph']) in operation listgraphistry/tests/compute/test_gfql_schema_changers.py: New comprehensive test suite (8 scenarios)graphistry/tests/compute/test_gfql_hypergraph.py: Updated to reflect new behaviorTest Coverage
Unit Tests
✅ Unit tests (compute): 396 passed, 49 skipped
✅ GFQL tests: 17/17 pass
✅ Chain tests: 25 passed, 3 skipped
✅ Lint (flake8): Pass
✅ Typecheck (mypy): Pass
Standalone Validation (10 scenarios in
plans/fix-umap-chain-tracking/)✅ Singleton operations: UMAP alone, hypergraph alone
✅ Multiple schema-changers: UMAP→UMAP, UMAP→hypergraph, n→umap→e→hypergraph→n
✅ Schema-changers at different positions: First, middle, last
✅ Mixed with filters: Filter→UMAP, UMAP→filter
✅ Edge cases: Empty before/after segments, consecutive schema-changers
✅ Let bindings: Schema-changers nested in
let()constructs work correctlyAll 10 standalone tests pass ✅
Example Usage
Testing Notes
Schema-changers work correctly in:
[n(), umap(), e()]let({'embedded': call('umap', ...)})[umap(), hypergraph()]