AGE returns a different number of rows after a row-preserving `collect`/`UNWIND` boundary before a relationship `MERGE`
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
调研方向
Start by reproducing the baseline and barrier queries on AGE 1.8.0 with PostgreSQL 18.6; the issue does not name implementation files or tests. Trace how the collect/UNWIND boundary affects the full-pattern MERGE, then add a regression test showing both queries return three rows (1, 2, 2) with the same multiplicity.
由索引模型根据 Issue 内容生成。
描述
Environment
- Apache AGE
1.8.0, PostgreSQL18.6 - Docker image:
apache/age:release_PG18_1.8.0
Reproduction
Run setup and target queries as separate statements. The two AGE graphs start
with the same single relationship.
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_repro22_left');
SELECT *
FROM ag_catalog.cypher('age_repro22_left', $$
CREATE ()-[:R]->()
$$) AS (v agtype);
SELECT ag_catalog.create_graph('age_repro22_right');
SELECT *
FROM ag_catalog.cypher('age_repro22_right', $$
CREATE ()-[:R]->()
$$) AS (v agtype);
Baseline query — age_repro22_left
SELECT *
FROM ag_catalog.cypher('age_repro22_left', $$
UNWIND [1, 2] AS i
MATCH (a)-[:R]->(b)
SET b.x = 1
MERGE (a)-[:R]->(b)<-[:R]-({id: 1})
RETURN i
$$) AS (i agtype);
Row-preserving barrier query — age_repro22_right
SELECT *
FROM ag_catalog.cypher('age_repro22_right', $$
UNWIND [1, 2] AS i
MATCH (a)-[:R]->(b)
SET b.x = 1
WITH {i: i, a: a, b: b} AS row
WITH collect(row) AS rows
UNWIND rows AS row
WITH row.i AS i, row.a AS a, row.b AS b
MERGE (a)-[:R]->(b)<-[:R]-({id: 1})
RETURN i
$$) AS (i agtype);
Expected and actual
Both target queries should return three rows: 1, 2, 2. The two input rows
are distinct (i is 1 and 2), and the map/collect/UNWIND barrier
retains both rows and their multiplicity.
On AGE 1.8.0 / PostgreSQL 18.6:
baseline: 1, 2, 2 (3 rows)
barrier: 1, 2 (2 rows)
The three expected rows follow from the full-pattern MERGE: the first input
row creates the missing pattern, and the next input row can then match two
complete paths. Cypher MERGE matches the full pattern or creates it; see the
Cypher MERGE documentation.
- 主要语言
- C
- 星标
- 4.9k
- 派生
- 535
- 平均合并
- 10 天 13 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/age 的其他 Issue
-
Integer division by -1 on INT64_MIN raises a misclassified floating-point exception (22P01) instead of bigint out of range可能已有人在做 @sean0407 于 10 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 3 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 53/100
维护者通常 3 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 3 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 3 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
Bug Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
category:port-update
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
Update OpenBSD CI to OpenBSD 8.0 and vmactions/openbsd-vm v1.4.9可能已有人在做 @hyoklee 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
v9.6.0: CMake incorrectly enforces presence of libevdev可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复