Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Bug: Segmentation fault matching on unwound results #6048

@mdbenito

Description

@mdbenito

Kuzu v0.11.2, Ubuntu 24.04

Create a db with a duplicate edge

CREATE NODE TABLE Person(name STRING PRIMARY KEY);
CREATE REL TABLE LivesWith(FROM Person TO Person);
CREATE (p:Person {name: 'Alice'});
CREATE (p:Person {name: 'Bob'});
MATCH (p:Person {name: 'Alice'}), (q:Person {name: 'Bob'}) CREATE (p)-[:LivesWith]->(q);
MATCH (p:Person {name: 'Alice'}), (q:Person {name: 'Bob'}) CREATE (p)-[:LivesWith]->(q);

Then try to delete duplicate edges with the following query:

MATCH (a)-[r:LivesWith]->(b)
WITH collect(r) AS rs
WITH rs[2:] AS dups
UNWIND dups AS d
MATCH (a)-[s:LivesWith]->(b)
WHERE s=d
DELETE s;

On my system this fails with

Segmentation fault (core dumped)

(As a side note, it would be nice to be able to just DELETE d, but the binder refuses with Error: Binder exception: Cannot delete expression d with type VARIABLE. Expect node or rel pattern.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions