Skip to content

Commit d5f04f0

Browse files
committed
cypher: retire post-#1260 reentry delegator shims
1 parent f8449bc commit d5f04f0

3 files changed

Lines changed: 9 additions & 79 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1111
### Documentation
1212
- **GFQL component-labeling examples + README clarity (#1324)**: Added concise WCC/SCC labeling examples for `compute_cugraph`, `compute_igraph('clusters')`, and local Cypher `CALL graphistry.cugraph.*` write/row modes in GFQL docs, clarified that component IDs are partition labels (not stable semantic IDs), and tightened the main README GFQL intro sentence for readability.
1313

14+
### Internal
15+
- **GFQL / Cypher row-carrier follow-through cleanup (#989, post-#1260 split)**: Retired transitional lowering-level bounded-reentry delegator shims (`_map_terminal_reentry_query`, `_drop_bare_alias_items_from_stage`, `_rewrite_multi_whole_row_prefix`, `_compile_bounded_reentry_query`) that only forwarded into `graphistry/compute/gfql/cypher/reentry/runtime.py`. Lowering now calls runtime-owned reentry helpers directly at use sites, and the split-guard tests were trimmed to keep only projection-planning delegator assertions.
16+
1417
## [0.55.1 - 2026-05-05]
1518

1619
### Tests

graphistry/compute/gfql/cypher/lowering.py

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7243,8 +7243,10 @@ def rewrite_text(expr: ExpressionText, field: str) -> ExpressionText:
72437243
# `_collect_secondary_property_refs` would fail-fast on what is in fact a
72447244
# forwarding pattern, blocking IC3 even after #1248 admits the prefix WITH.
72457245
secondary_forwarding_re = re.compile(r"[A-Za-z_][A-Za-z0-9_]*")
7246+
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
7247+
72467248
cleaned_with_stages_tail = tuple(
7247-
_drop_bare_alias_items_from_stage(
7249+
_reentry_runtime._drop_bare_alias_items_from_stage(
72487250
stage, secondary_aliases, identifier_re=secondary_forwarding_re
72497251
)
72507252
for stage in query.with_stages[1:]
@@ -7373,52 +7375,6 @@ def rewrite_text(expr: ExpressionText, field: str) -> ExpressionText:
73737375
return rewritten_query, rewritten_prefix_stage, tuple(sorted(secondary_aliases))
73747376

73757377

7376-
def _map_terminal_reentry_query(
7377-
compiled_query: CompiledCypherQuery,
7378-
*,
7379-
transform: Callable[[CompiledCypherQuery], CompiledCypherQuery],
7380-
) -> CompiledCypherQuery:
7381-
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
7382-
7383-
return _reentry_runtime._map_terminal_reentry_query(compiled_query, transform=transform)
7384-
7385-
7386-
def _drop_bare_alias_items_from_stage(
7387-
stage: ProjectionStage,
7388-
aliases: AbstractSet[str],
7389-
*,
7390-
identifier_re: "re.Pattern[str]",
7391-
) -> ProjectionStage:
7392-
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
7393-
7394-
return _reentry_runtime._drop_bare_alias_items_from_stage(stage, aliases, identifier_re=identifier_re)
7395-
7396-
7397-
def _rewrite_multi_whole_row_prefix(
7398-
prefix_stage: ProjectionStage,
7399-
*,
7400-
query: CypherQuery,
7401-
reentry_first_alias: Optional[str],
7402-
) -> Tuple[ProjectionStage, Tuple[ProjectionStage, ...], Dict[str, Tuple[str, ...]]]:
7403-
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
7404-
7405-
return _reentry_runtime._rewrite_multi_whole_row_prefix(
7406-
prefix_stage,
7407-
query=query,
7408-
reentry_first_alias=reentry_first_alias,
7409-
)
7410-
7411-
7412-
def _compile_bounded_reentry_query(
7413-
query: CypherQuery,
7414-
*,
7415-
params: Optional[Mapping[str, Any]] = None,
7416-
) -> CompiledCypherQuery:
7417-
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
7418-
7419-
return _reentry_runtime._compile_bounded_reentry_query(query, params=params)
7420-
7421-
74227378
def _compile_call_query(
74237379
query: CypherQuery,
74247380
*,
@@ -8349,7 +8305,9 @@ def _attach_graph_context(result: CompiledCypherQuery) -> CompiledCypherQuery:
83498305
params=params,
83508306
)
83518307
if query.reentry_matches:
8352-
return _attach_graph_context(_compile_bounded_reentry_query(query, params=params))
8308+
from graphistry.compute.gfql.cypher.reentry import runtime as _reentry_runtime
8309+
8310+
return _attach_graph_context(_reentry_runtime._compile_bounded_reentry_query(query, params=params))
83538311
if query.call is not None:
83548312
return _attach_graph_context(_compile_call_query(query, params=params))
83558313
if query.row_sequence:
Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from __future__ import annotations
22

3-
from graphistry.compute.chain import Chain
43
from graphistry.compute.gfql.cypher import lowering, projection_planning
5-
from graphistry.compute.gfql.cypher.reentry import runtime as reentry_runtime
64

75

86
def test_issue_1301_projection_split_delegator_round_trip() -> None:
@@ -11,17 +9,6 @@ def test_issue_1301_projection_split_delegator_round_trip() -> None:
119
extracted = projection_planning._split_qualified_name(expr, line=1, column=1)
1210
assert lowered == extracted == ("person", "name")
1311

14-
15-
def test_issue_1301_reentry_runtime_delegator_identity_path() -> None:
16-
compiled = lowering.CompiledCypherQuery(chain=Chain([], validate=False))
17-
18-
lowered = lowering._map_terminal_reentry_query(compiled, transform=lambda q: q)
19-
extracted = reentry_runtime._map_terminal_reentry_query(compiled, transform=lambda q: q)
20-
21-
assert lowered is compiled
22-
assert extracted is compiled
23-
24-
2512
def test_issue_1301_projection_delegator_forwards_args(monkeypatch) -> None:
2613
captured = {}
2714
alias_obj = object()
@@ -43,21 +30,3 @@ def _stub(expr, *, alias_targets, params, field, line, column):
4330

4431
assert out == ("x", "y")
4532
assert captured["args"] == ("a.b", alias_targets, {"p": 1}, "return.item", 7, 11)
46-
47-
48-
def test_issue_1301_reentry_compile_delegator_forwards_params(monkeypatch) -> None:
49-
captured = {}
50-
51-
def _stub(query, *, params):
52-
captured["query"] = query
53-
captured["params"] = params
54-
return "compiled"
55-
56-
monkeypatch.setattr(reentry_runtime, "_compile_bounded_reentry_query", _stub)
57-
query = object()
58-
params = {"limit": 5}
59-
out = lowering._compile_bounded_reentry_query(query, params=params)
60-
61-
assert out == "compiled"
62-
assert captured["query"] is query
63-
assert captured["params"] == params

0 commit comments

Comments
 (0)