Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの 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 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/age のほかの issue

apache/age の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。