zihaozeng0021 opened a new issue, #2290:
URL: https://github.com/apache/age/issues/2290
### Note
This looks closely related to issue #2289, but it doesn’t seem to be the
same underlying problem, so I opened a new report.
### Configuration
AGE Version: `apache/age:latest` (pulled 2025-12-26)
Operating System: WSL2 – Ubuntu 24.04.1 LTS
Installation Method: Docker
---
### Steps to reproduce
1. Start AGE via Docker
```
docker run \
--name age \
-p 5455:5432 \
-e POSTGRES_USER=postgresUser \
-e POSTGRES_PASSWORD=postgresPW \
-e POSTGRES_DB=postgresDB \
-d \
apache/age:latest
```
2. Connect with psql
```
PGPASSWORD='postgresPW' psql -h localhost -p 5455 -U postgresUser -d
postgresDB
```
3. Run the following query
Set up:
```
CREATE EXTENSION IF NOT EXISTS age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('test');
SELECT * FROM cypher('test', $$ CREATE (:N) RETURN 1 $$) AS (x agtype);
```
First Control Query (`WHERE true`):
```
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE true
RETURN n
$$) AS (n agtype);
count
-------
1
(1 row)
```
Second Control Query (`WHERE false`):
```
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE false
RETURN n
$$) AS (n agtype);
count
-------
0
(1 row)
```
Third Control Query (`WHERE 1 IN []` throws an error):
```
postgresDB=# SELECT *
FROM cypher('test', $$
WITH 1 AS x
WHERE 1 IN []
RETURN x AS v
$$) AS (v agtype);
ERROR: cache lookup failed for type 0
LINE 2: FROM cypher('test', $$
^
```
The buggy query:
```
postgresDB=# SELECT count(*)
FROM cypher('test', $$
MATCH (n:N)
WHERE 1 IN []
RETURN n
$$) AS (n agtype);
count
-------
1
(1 row)
```
---
### Expected behaviour
The buggy query should behave the same as the second control query.
However, since `1 IN []` is currently problematic (reported in issue #2289),
the buggy query should instead behave the same as the third control query under
this condition.
### Actual behaviour
The buggy query behaves the same as the first control query.
--
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]