AGE returns a different number of rows after a row-preserving `collect`/`UNWIND` boundary before a relationship `MERGE`
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C
- Stelle
- 4.9k
- Fork
- 535
- Merge medio
- 10g 13h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/age
-
Integer division by -1 on INT64_MIN raises a misclassified floating-point exception (22P01) instead of bigint out of rangeForse già presa @sean0407 l’ha presa 11 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 53/100
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
apache/age#2596 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 3 giorni
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
valkey-io/valkey#4979 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Document the Config FileApertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cherries-works/pulse#76 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
colbymchenry/codegraph#2770 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FriendsofECCE/ECCE#425 ·