Skip to content

Left join implementation is incorrect for 0 or multiple batches on the right side #239

@Dandandan

Description

@Dandandan

Describe the bug
Currently the left join generates a null for every row that is not present in the right batch.

However, this is wrong, as there should be no match in all of the right batches.

The current implementation generates extra (left, none) tuples for every batch when there is no match against a left key, and generates no left-side rows if the right side is empty.

To fix it, we need to mark the keys or indexes on the left side as visited and scan the items once at the end to generate the rows without any match.

To Reproduce

Run LEFT join against more 0 or multiple batches.

Expected behavior
The left-side rows are included only once if there is no match.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions