Skip to content

Fix RXFilter.node_ids() dropping selected nodes with include flags#315

Merged
JoOkuma merged 1 commit into
royerlab:mainfrom
JoOkuma:fix-rxfilter-node-ids-include-flags
Jul 1, 2026
Merged

Fix RXFilter.node_ids() dropping selected nodes with include flags#315
JoOkuma merged 1 commit into
royerlab:mainfrom
JoOkuma:fix-rxfilter-node-ids-include-flags

Conversation

@JoOkuma

@JoOkuma JoOkuma commented Jul 1, 2026

Copy link
Copy Markdown
Member

With include_targets/include_sources (or edge filters), node_ids() was rebuilt purely from edge endpoints: explicitly selected nodes without edges (e.g. isolated nodes) were dropped, and both endpoints were added regardless of which flag was set. SQLGraph keeps them.

Keep the base selection and extend it only with the endpoints the include flags request; pure edge-filtered queries still return the matching edges' endpoints.

Added a backend-parametrized regression test.

Note: overlaps with #314 in a test file; whichever lands second needs a trivial rebase.

When include_targets/include_sources was set (or edge filters were
present), the rustworkx filter rebuilt the node selection purely from
edge endpoints:

- explicitly selected or attribute-filtered nodes without matching
  edges (e.g. isolated nodes) were dropped from node_ids();
- both endpoints were added regardless of which include flag was set,
  pulling in sources that include_targets never asked for.

Keep the base selection and only extend it with the endpoints the
include flags request, matching SQLFilter. Pure edge-filtered queries
still return the matching edges' endpoints.
@JoOkuma JoOkuma merged commit ed8c15a into royerlab:main Jul 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant