Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`DETACH DELETE` changes result cardinality for duplicate matches of a bound relationship

オープン
#2,595 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, postgresql

調査の方向性

Start at the Cypher planner and executor paths that handle DETACH DELETE and row propagation after deletion; the issue does not name specific files or tests. Reproduce the two queries on AGE 1.8.0 with PostgreSQL 18.6, then trace why the baseline loses a duplicate matched row. Done means both queries preserve the two matched rows, with a regression test covering the reproduction.

索引モデルが issue の本文から書いたものです。

説明

bug

Environment

  • Apache AGE 1.8.0, PostgreSQL 18.6
  • Docker image: apache/age:release_PG18_1.8.0

Reproduction

The setup contains one fixed-length path and two parallel incoming
relationships. The second MATCH therefore yields two rows with the same
n1, n0, and r0 bindings.

LOAD 'age';
SET search_path = ag_catalog, public;

SELECT ag_catalog.create_graph('age_repro23_left');
SELECT *
FROM ag_catalog.cypher('age_repro23_left', $$
CREATE (a {id: 83})-[:rt2]->(n0:l0)
      -[:rt7 {k4: true, k7: ''}]->(c:l2),
       (n1:l1 {k5: false})-[:x]->(n0),
       (n1)-[:y]->(n0)
$$) AS (v agtype);

SELECT ag_catalog.create_graph('age_repro23_right');
SELECT *
FROM ag_catalog.cypher('age_repro23_right', $$
CREATE (a {id: 83})-[:rt2]->(n0:l0)
      -[:rt7 {k4: true, k7: ''}]->(c:l2),
       (n1:l1 {k5: false})-[:x]->(n0),
       (n1)-[:y]->(n0)
$$) AS (v agtype);
Baseline query — age_repro23_left
SELECT *
FROM ag_catalog.cypher('age_repro23_left', $$
MATCH ({id: 83})-[:rt2]->(n0:l0)-[r0:rt7]->(:l2)
WHERE r0.k4 = true
WITH *
MATCH (n1:l1 {k5: false})-[]->(n0)
WHERE r0.k7 CONTAINS ''
DETACH DELETE n1, n0
RETURN {r0: r0} AS result
$$) AS (result agtype);
Scope-preserving barrier query — age_repro23_right
SELECT *
FROM ag_catalog.cypher('age_repro23_right', $$
MATCH ({id: 83})-[:rt2]->(n0:l0)-[r0:rt7]->(:l2)
WHERE r0.k4 = true
WITH n0, r0
UNWIND [0] AS barrier0
WITH n0, r0
MATCH (n1:l1 {k5: false})-[]->(n0)
WHERE r0.k7 CONTAINS ''
WITH n0, r0, n1
UNWIND [0] AS barrier1
WITH n0, r0, n1
DETACH DELETE n1, n0
WITH {r0: r0} AS row
WITH collect(row) AS rows
UNWIND rows AS row
WITH row.r0 AS r0
RETURN {r0: r0} AS result
$$) AS (result agtype);

Expected and actual

Both queries should preserve the two matched rows.

On AGE 1.8.0 / PostgreSQL 18.6:

baseline: 1 row
barrier:  2 rows
主要言語
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 を短くまとめたダイジェスト。