Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

AGE returns a different number of rows after a row-preserving `collect`/`UNWIND` boundary before a relationship `MERGE`

未关闭
#2,594 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c, postgresql
领域
backend, databases

调研方向

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 内容生成。

描述

bug

Environment

  • Apache AGE 1.8.0, PostgreSQL 18.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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/age 的其他 Issue

查看 apache/age 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。