`r IN relationships(path)` fails with `unknown type of agtype container 1610612736`
- 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.6
Docker image: `apache/age:release_PG18_1.8.0`
## Reproduction
```sql
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_issue_case15');
SELECT *
FROM ag_catalog.cypher('age_issue_case15', $$
CREATE (a:L)-[:R]->(b)
$$) AS (v agtype);
SELECT *
FROM ag_catalog.cypher('age_issue_case15', $$
MATCH ()-[r0]->()
MATCH p0 = (:L)-[:R]->()
RETURN r0 IN relationships(p0) AS member
$$) AS (member agtype);
```
## Expected
The query returns:
member
------
true
## Actual
ERROR: unknown type of agtype container 1610612736
The following controls succeed:
MATCH p0 = (:L)-[:R]->()
RETURN relationships(p0)
MATCH ()-[r0]->()
RETURN r0 IN [r0] AS member
Contributor guide
Research direction
Start by running the SQL reproduction with the Apache AGE 1.8.0 Docker image against PostgreSQL 18.6, then compare it with the listed control queries. Trace the handling of relationships(path) when evaluating r IN relationships(p), and confirm that the reproduction returns member=true without the agtype container error while the controls still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100