feat(gfql): add schema Arrow boundary validation#1635
Merged
Conversation
18d4ec4 to
a8c9f09
Compare
a8c9f09 to
76065d0
Compare
This was referenced May 25, 2026
perf: graphistry wheel size (625 kB) — GFQL engine files are large, investigate modularization
#1058
Closed
Closed
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.
Closes #1339.
Refs #1058.
Summary
NodeType.from_arrow(...)EdgeType.from_arrow(...)EdgeTopology.from_metadata(...)GraphSchema.node_arrow(),edge_arrow(),to_arrow(),from_arrow(...)g.to_arrow(..., schema_validate='strict'|'autofix', schema_table='edges'|'nodes')g.plot(..., schema_validate='strict'|'autofix')g.upload(..., schema_validate='strict'|'autofix')g.validate_arrow_schema('edges'|'nodes', validate='strict'|'autofix')schema_validate=Falseby default, so existingplot()/upload()/to_arrow()calls are unchanged.Design Notes
GraphSchema.from_arrow(...)requires named node/edge declarations and edge topology, either directly or from the payload emitted byGraphSchema.to_arrow().gfql_remote()schema transport; GFQL remote: send bound typed GraphSchema with gfql_remote requests #1465 remains the remote follow-on.validate='autofix'.schema_validate='strict'rejects missing declared columns, incompatible Arrow types, and non-null violations.schema_validate='autofix'casts compatible Arrow columns to declared Arrow types after normal conversion.label__...markers so inactive relationship types do not force their properties.Coordination
GraphSchemainstances and then flow into this boundary layer.graphistry/compute/gfql/ir/**files changed.LOC Buckets
Validation
origin/master@79a61f9ab7d3efa4984007c0ae30660adbd6df4e; PR head76065d0b4f20034ced71fd49485d94346323f662python3 -m pytest -q graphistry/tests/test_plotter.py::TestPlotterArrowConversions graphistry/tests/compute/gfql/test_public_schema.py->50 passed, 6 skipped, 1 xfailedpython3 -m pytest -q docs/test_doc_examples.py -k schema->1 passed, 29 deselectedpython3 -m pytest -q graphistry/tests/compute/gfql/test_public_schema.py->21 passed./bin/ruff.sh graphistry/schema.py graphistry/PlotterBase.py graphistry/Plottable.py graphistry/models/types.py graphistry/exceptions.py graphistry/tests/compute/gfql/test_public_schema.py-> pass./bin/typecheck.sh graphistry/schema.py graphistry/PlotterBase.py graphistry/Plottable.py graphistry/models/types.py graphistry/exceptions.py-> passuvx --from mypy==1.14.1 mypy graphistry/PlotterBase.py-> pass after py3.8 mypy-compatible Arrow column variable/cast fixgit diff --check origin/master...HEAD-> passRAPIDS_VERSION=26.02 PROFILE=basic WITH_GPU=1 WITH_IMAGE_BUILD=0 TEST_FILES="graphistry/tests/test_plotter.py::TestPlotterArrowConversions graphistry/tests/compute/gfql/test_public_schema.py" docker/test-rapids-official-local.sh-> cudf 26.02.01, cuml 26.02.00, Python 3.13.12,56 passed, 1 xfailedRAPIDS_VERSION=25.02 PROFILE=basic WITH_GPU=1 WITH_IMAGE_BUILD=0 TEST_FILES="graphistry/tests/test_plotter.py::TestPlotterArrowConversions graphistry/tests/compute/gfql/test_public_schema.py" docker/test-rapids-official-local.sh-> cudf 25.02.02, cuml 25.02.01, Python 3.12.9,56 passed, 1 xfailedPending / CI