File tree Expand file tree Collapse file tree
graphistry/tests/compute/gfql/index Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,6 +459,34 @@ def test_index_bounded_range_min_one_hops_none(engine):
459459 assert any (step ["path" ] == "index" for step in steps ), steps
460460
461461
462+ def test_index_coverability_rejects_invalid_bounded_ranges ():
463+ """Planner declines invalid direct-hop ranges before index traversal."""
464+ from graphistry .compute .gfql .index .api import _hop_is_index_coverable
465+
466+ common = dict (
467+ nodes = pd .DataFrame ({"id" : [0 ]}),
468+ to_fixed_point = False ,
469+ hops = None ,
470+ min_hops = 1 ,
471+ max_hops = 2 ,
472+ output_min_hops = None ,
473+ output_max_hops = None ,
474+ label_node_hops = None ,
475+ label_edge_hops = None ,
476+ label_seeds = False ,
477+ edge_match = None ,
478+ source_node_match = None ,
479+ destination_node_match = None ,
480+ source_node_query = None ,
481+ destination_node_query = None ,
482+ edge_query = None ,
483+ include_zero_hop_seed = False ,
484+ target_wave_front = None ,
485+ return_as_wave_front = False ,
486+ )
487+ assert not _hop_is_index_coverable (** dict (common , max_hops = 0 ))
488+ assert not _hop_is_index_coverable (** dict (common , min_hops = 0 ))
489+
462490@pytest .mark .parametrize ("engine" , ENGINES )
463491def test_index_duplicate_node_ids (engine ):
464492 # B2: duplicate node ids corrupted the unique-key node_id index. gfql_index_all
You can’t perform that action at this time.
0 commit comments