Skip to content

persist unexpected behavior after concatenation of big chains #1356

@ai-ignatyev

Description

@ai-ignatyev

Description

import datachain as dc

x = dc.read_records(
    [ {'idx': i} for i in range(10000) ],
    schema={'idx': int}
)
y = dc.read_records(
    [ {'idx': i} for i in range(10000, 20000) ],
    schema={'idx': int}
)

z = x | y
print('before:', x.count(), y.count(), z.count())

z = z.persist()
print('after:', x.count(), y.count(), z.count())

Expected output:

before: 10000 10000 20000
after: 10000 10000 20000

Real output:

before: 10000 10000 20000
after: 10000 10000 40000

Version Info

datachain -V
0.31.2

python -V
Python 3.12.9

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