apache / apache/geaflow

Add runnable `.sql` examples and regression tests for the built-in graph algorithms

Open
#794 1 comment 0 reactions 1 assignee Claimed by @Loognqiang View on GitHub
enhancement good first issue
Dominant language
Java
Stars
808
Forks
188
Avg merge
3d 22h
Merged PRs (30d)
2

Description

### What & why

GeaFlow ships 19 built-in graph algorithms (PageRank, SSSP, WCC, Louvain, LPA,
KCore, TriangleCount, JaccardSimilarity, …), but the `geaflow-dsl-runtime`
regression suite only covers some of them. Filling in end-to-end
`CALL ... YIELD` tests for the rest guards against future refactors quietly
breaking an algorithm. Great if you want to *understand* what graph algorithms
actually compute.

GeaFlow 有 19 个内置图算法,但回归测试只覆盖了一部分。给其余算法补端到端的
`CALL ... YIELD` 测试,能防止后续重构悄悄改坏算法。想真正搞懂"图算法到底算了什么"的同学,这题很合适。

### The task

Pick a few algorithms that have no tests (or thin coverage) and add `.sql`
queries + `.txt` expected outputs.

挑几个尚无测试或覆盖薄弱的算法,补 `.sql` 查询 + `.txt` 期望输出。

### Where to look

1. Test graph definition: `geaflow-dsl-runtime/src/test/resources/modern_graph.sql`.
2. Query template: existing `query/gql_algorithm_001.sql`
(`CALL SSSP(1) YIELD (vid, distance)` style); expected output at `expect/gql_algorithm_001.txt`.
3. Test entry point: `geaflow-dsl-runtime/.../runtime/query/GQLAlgorithmTest.java`.

### Done when

- [ ] At least one `.sql`/`.txt` pair added per algorithm you claim
- [ ] Expected outputs are **verified by hand**, not copied from program output
- [ ] `mvn test -Dtest=GQLAlgorithmTest` passes
- [ ] The PR briefly explains why each expected result is correct on the test graph

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.