AGE entity-projection alias audit
- Dominant language
- C
- Stars
- 4.8k
- Forks
- 523
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
Environment: Apache AGE `1.8.0`, PostgreSQL `18.1`, image
## Reproduction
```cypher
CREATE (n {id: 1})
WITH n AS alias0
MATCH (alias0)
RETURN alias0
```
Observed error:
```text
ERROR: variable 'alias0' already exists
```
The same error occurs after a second boundary:
```cypher
CREATE (n {id: 1})
WITH n AS alias0
WITH alias0
MATCH (alias0)
RETURN alias0
```
The two renamed-alias queries both produced the existing-variable error. The
control query below succeeded and returned the created vertex:
```cypher
CREATE (n {id: 4})
WITH n
MATCH (n)
RETURN n
```
Therefore this is not a generic prohibition on reusing an already-bound
pattern variable. The failure is specific to the entity projection alias.
Contributor guide
Research direction
Start by running the two renamed-alias reproductions and the successful control query on Apache AGE 1.8.0 with PostgreSQL 18.1. Trace the entity projection alias handling and locate the relevant regression-test entry point. Done means both renamed-alias queries succeed without the existing-variable error while the control query remains successful.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 63/100