Repository navigation
chore(gfql): shrink predicate ast helpers - #1603
Merged
Merged
Conversation
lmeyerov
added a commit
that referenced
this pull request
Aug 19, 2026
_filter_dict_to_json dropped every entry whose value was None, so a filter the
local engine evaluates as "matches nothing" serialized to no filter at all --
"matches everything". n({'x': None}).to_json() emitted {'filter_dict': {}}.
The guard dates to the original 2023 chain-serialization commit (ece0924) and
was mechanically lifted into the helper by #1603; no caller depends on the drop
and no test asserted it. maybe_filter_dict_from_json already preserved a JSON
null verbatim, so the asymmetry was entirely on the write side and no from_json
change is needed.
Blast radius is not remote-only: serialize_binding_ops is an in-process
to_json/from_json launder used by the Cypher connected-pattern and cartesian
MATCH lowering, so MATCH (a {x: null})-[r]->(b) returned 2 rows and
MATCH (a {x: null}), (b) returned 9 rows on a 3-node graph where both must
return 0, with no server involved.
Also refreshes a now-stale docstring bullet in cypher/lowering.py that cited the
drop as the reason _connected_join_pushable_value refuses to push None; the
guard itself is unchanged and still correct.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AjbKuKheqDu78oapRT5AYm
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.
Summary
Closes part of #1058.
GFQL implementation shrink in the requested paired audit surface:
graphistry/compute/predicates/comparison.pymatch()andfullmatch()No public predicate helper names, predicate JSON wire shapes, route names, compiler-plan dispatch, structured errors, schema hooks, remote hooks, or
validate='autofix'semantics changed.Audit Notes
graphistry/compute/ast.pyandgraphistry/compute/predicates/do not contain Arrow conversion orvalidate='autofix'paths; feat(arrow): add opt-in mixed type coercion #1591/fix(arrow): preserve nulls in validate autofix #1598 did not create dead Arrow code in these files.is_not_inimplementation exists in the target files, so there is nois_in/is_not_induplicate body to collapse here.numeric.pyandcomparison.pyoverlap by predicate name, but both are reachable/public with different ownership:numeric.pyremains used by direct AST/filter validation paths, whilecomparison.pyremains used by Cypher lowering and temporal/string comparison support. This PR does not collapse those public modules.LOC Buckets
+68 / -169, net-101graphistry/compute/ast.py:+12 / -20, net-8graphistry/compute/predicates/comparison.py:+29 / -72, net-43graphistry/compute/predicates/str.py:+27 / -77, net-50+0 / -0, net0+1 / -0, net+1Compiler-plan surface touched: no. The AST edit is a private serialization helper extraction that preserves existing node/edge wire JSON.
Validation
python3 -m pytest -q graphistry/tests/compute/predicates/test_comparison_strings.py graphistry/tests/compute/predicates/test_comparison_conformance.py graphistry/tests/compute/predicates/test_str.py graphistry/tests/compute/predicates/test_numeric.py graphistry/tests/test_compute_chain.py161 passed, 96 skipped./bin/ruff.sh graphistry/compute/ast.py graphistry/compute/predicates/comparison.py graphistry/compute/predicates/str.py./bin/typecheck.sh graphistry/compute/ast.py graphistry/compute/predicates/comparison.py graphistry/compute/predicates/str.pypython3 -m pytest -q graphistry/tests/test_schema_artifacts.py graphistry/tests/test_viz_settings.py11 passedpython3 -m graphistry.devschemas.export --checkgit diff --check305 passed, 96 skippedcudf.Series(...)withcudaErrorNoDevicebecause this host has cuDF installed without a CUDA deviceRAPIDS_VERSION=26.02 PROFILE=gfql TEST_FILES="graphistry/tests/compute/predicates/test_str.py graphistry/tests/compute/predicates/test_comparison_conformance.py graphistry/tests/compute/predicates/test_temporal_values.py" docker/test-rapids-official-local.sh181 passed, 4 skipped181 passed, 4 skipped, with the known 25.02 driver-version warning from the RAPIDS imageCoordination
graphistry/compute/predicates/andgraphistry/compute/ast.py, plusCHANGELOG.md.