Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,594 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, postgresql

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C
Estrellas
4.9k
Forks
535
Merge medio
10 d 13 h
PR fusionados (30 d)
7

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/age

Todos los issues de apache/age

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.