gregfelice opened a new pull request, #2413:
URL: https://github.com/apache/age/pull/2413
## Summary
Adds an in-source design-note comment block at the top of
`src/backend/utils/adt/age_vle.c` documenting:
1. **Semantics** — edge-isomorphism per openCypher: no repeated edges per
path, vertices may recur. Includes a small triangle example showing why a
visited-node ("vertex-isomorphism") optimization would silently drop spec-valid
paths.
2. **Cost model** — bounded `[*min..max]` is polynomial in edge count for
fixed `max`; unbounded `[*]` / `[*1..]` is factorial worst-case on cycle-rich
graphs. This is inherent to edge-isomorphic enumeration and cannot be reduced
without changing semantics.
3. **Implementation pointer** — one paragraph identifying
`edge_state_entry.used_in_path`,
`dfs_find_a_path_between`/`dfs_find_a_path_from`, and `is_edge_in_path()` as
the cycle-prevention enforcement sites.
## Motivation
Issue #2349 misdiagnosed the VLE as lacking cycle detection and proposed a
visited-node filter as a fix. Cycle prevention already exists via
edge-uniqueness, and the proposed change would violate the openCypher
specification. The current source has no overview comment explaining these
semantics, so a future reader would have to reconstruct them from the DFS code
and the spec. This comment block captures the semantics and cost model at a
point the reader is guaranteed to pass through, preventing repeat misanalysis.
Per @jrgemignani's guidance on #2349, no GUC, no code change — just
documentation.
## Scope
- **Files changed:** 1 (`src/backend/utils/adt/age_vle.c` — 44-line comment
block inserted between the license header and the first `#include`).
- **No behavior change, no new symbols, no tests added** (nothing to test).
## Test plan
- [x] Cassert build (`--enable-cassert` PG18) clean, no new warnings
- [x] Cassert `installcheck` green — 33/33 AGE tests pass, including
`cypher_vle`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]