Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Dandandan opened this issue May 2, 2021 · 0 comments · Fixed by #238
Closed
Labels
bug Something isn't working

Comments

@Dandandan
Copy link
Contributor

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.

@Dandandan Dandandan added the bug Something isn't working label May 2, 2021
mustafasrepo pushed a commit that referenced this issue Dec 25, 2023
* Initial

* Update aggregator_nested_loop_join.rs

* Update aggregator_nested_loop_join.rs

* Update aggregator_nested_loop_join.rs

* Clippy

* Update rat_exclude_files.txt

* Update comments

* Corrections on proto files and tests

* Resolve clippy

* Rat file correction

* Review

* Review addressed

* Final Review

---------

Co-authored-by: Mehmet Ozan Kabak <ozankabak@gmail.com>
mustafasrepo pushed a commit that referenced this issue Dec 25, 2023
* Initial

* Update aggregator_nested_loop_join.rs

* Update aggregator_nested_loop_join.rs

* Update aggregator_nested_loop_join.rs

* Clippy

* Update rat_exclude_files.txt

* Update comments

* Corrections on proto files and tests

* Resolve clippy

* Rat file correction

* Review

* Review addressed

* Final Review

---------

Co-authored-by: Mehmet Ozan Kabak <ozankabak@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant