Skip to content

Bug: Combining unwind with merge returns wrong number of tuples #285

@andreasdamm-shure

Description

@andreasdamm-shure

Ladybug version

0.15.1

What operating system are you using?

MacOS Tahoe 26.3.1

What happened?

When running a merge clause from an unwind statement repeatedly merging the same node, only one tuple is returned instead of one tuple per unwound list member.

Are there known steps to reproduce?

Using the Kuzu CLI run the following queries

create node table A(id string default gen_random_uuid(), stuff int8, primary key (id));

unwind [1, 1, 1] as i
      merge (a:A { stuff: i })
      return a.id;

The output should look like

┌──────────────────────────────────────┐
│ a.id                                 │
│ STRING                               │
├──────────────────────────────────────┤
│ 412dcddf-0f53-4c02-aea0-645f14037e0f │
│ 412dcddf-0f53-4c02-aea0-645f14037e0f │
│ 412dcddf-0f53-4c02-aea0-645f14037e0f │
└──────────────────────────────────────┘

The output should return the same id three times, instead the output is

┌──────────────────────────────────────┐
│ a.id                                 │
│ STRING                               │
├──────────────────────────────────────┤
│ 412dcddf-0f53-4c02-aea0-645f14037e0f │
└──────────────────────────────────────┘

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions