Local object in Eval Api includes results for the whole graph even if running on a subgraph
Open
Nobody has claimed this yet.
Bug
Rust Core
Semantics/API
- Dominant language
- Rust
- Stars
- 642
- Forks
- 70
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 21
Description
Pagerank example:
let out: HashMap<VID, f64> = runner.run(
vec![Job::new(step1)],
vec![Job::new(step2), Job::new(step3), Job::new(step4), step5],
PageRankState::new(num_vertices),
|g, _, _, local| {
local
.iter()
.enumerate()
.map(|(v_ref, score)| (v_ref.into(), score.score))
.collect::<HashMap<_, _>>()
},
threads,
iter_count,
None,
None,
);
If this is run on a VertexSubgraph the local.iter() part still iterates over the whole graph, which might be unexpected. Might also need to be careful with the assumption that the position in the list is equal to the vertex id when subgraphs are involved.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Pagerank example and the Eval API callback using VertexSubgraph and local.iter(). Check how local results are constructed and whether vertex positions are treated as IDs. Done means subgraph evaluation returns only the intended vertices with correct identifiers, while full-graph behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100