@@ -1185,19 +1185,19 @@ def _directed_fixed_point_binding_rows_polars(
11851185 )
11861186
11871187 # (a) depth probe: dedup-by-node frontier, so each hop costs O(N) not O(paths).
1188- frontier = _lazy_collect ( state .select (pl .col ("__current__" )).unique () )
1188+ frontier_lf = state .select (pl .col ("__current__" )).unique ()
11891189 depth = 0
11901190 exhausted = node_cap == 0 # no matched edges at all -> no walk of length >= 1
11911191 for hop in range (1 , node_cap + 1 ):
11921192 frontier = _lazy_collect (
1193- frontier .lazy ()
1194- .join (pairs_lf , left_on = "__current__" , right_on = "__from__" , how = "inner" )
1193+ frontier_lf .join (pairs_lf , left_on = "__current__" , right_on = "__from__" , how = "inner" )
11951194 .select (pl .col ("__to__" ).alias ("__current__" ))
11961195 .unique ()
11971196 )
11981197 if frontier .height == 0 :
11991198 exhausted = True
12001199 break
1200+ frontier_lf = frontier .lazy ()
12011201 depth = hop
12021202 if not exhausted :
12031203 RowPipelineMixin ._gfql_bindings_error (
@@ -1215,7 +1215,7 @@ def binding_rows_polars(
12151215 binding_ops : Sequence [Dict [str , JSONVal ]],
12161216 attach_prop_aliases : Optional [Sequence [str ]] = None ,
12171217) -> Optional [Plottable ]:
1218- """Native polars bindings-row table for FIXED-LENGTH connected patterns (#1709).
1218+ """Native polars bindings-row table for connected alias patterns (#1709).
12191219
12201220 Materializes one row per matched path for an alternating ``n/e/n/...`` pattern
12211221 (the ``rows(binding_ops=...)`` op emitted by Cypher multi-alias lowering), with
@@ -1225,14 +1225,19 @@ def binding_rows_polars(
12251225 columns — raw ``node_id``, ``a__a_join__``, leaked ``__gfql_edge_index__`` —
12261226 that no lowered query references; those are intentionally not replicated.)
12271227
1228+ Covers fixed-length hops, bounded variable-length (directed ``-[*i..k]->`` and
1229+ undirected ``-[*1..k]-``), unbounded DIRECTED fixed point (``-[*]->`` /
1230+ ``-[*0..]->``), and the node-only cartesian mode.
1231+
12281232 Returns None to DECLINE (caller raises the honest NIE) for anything outside
1229- the supported subset: variable-length/multi-hop edges, shortestPath scalar
1230- bindings, node ``query=`` / edge query or endpoint-match params, hop labels,
1231- HAS_-label destination disambiguation on duplicate-node-id graphs (unique-id
1232- graphs run native — pandas would not narrow there either), seeded re-entry
1233- contexts, cartesian (node-only) mode, and the legacy ``alias_endpoints``
1234- variant. NO-CHEATING:
1235- never bridges to pandas. Parity gate: differential tests vs the pandas oracle.
1233+ that subset: undirected variable-length outside ``min_hops == 1`` (including
1234+ undirected unbounded), aliased variable-length relationships, unbounded
1235+ segments without ``to_fixed_point``, shortestPath scalar bindings, node
1236+ ``query=`` / edge query or endpoint-match params, hop labels, HAS_-label
1237+ destination disambiguation on duplicate-node-id graphs (unique-id graphs run
1238+ native — pandas would not narrow there either), duplicate-id re-entry seeds,
1239+ and the legacy ``alias_endpoints`` variant. NO-CHEATING: never bridges to
1240+ pandas. Parity gate: differential tests vs the pandas oracle.
12361241 """
12371242 import polars as pl
12381243 from graphistry .compute .ast import ASTEdge , ASTNode , ASTObject , from_json as ast_from_json
0 commit comments