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

bugfix(pipeline): Fix state machine of hash join #5242

Merged
merged 4 commits into from
May 9, 2022

Conversation

leiysky
Copy link
Contributor

@leiysky leiysky commented May 9, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Fix the bug that hash join probe transform won't emit Finished event.

Changelog

  • Bug Fix

Related Issues

Close #5234

@leiysky leiysky added the C-bug Category: something isn't working label May 9, 2022
@leiysky leiysky requested a review from sundy-li May 9, 2022 02:45
@leiysky leiysky requested a review from BohuTANG as a code owner May 9, 2022 02:45
@vercel
Copy link

vercel bot commented May 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) May 9, 2022 at 4:42AM (UTC)

@mergify
Copy link
Contributor

mergify bot commented May 9, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label May 9, 2022
@BohuTANG
Copy link
Member

BohuTANG commented May 9, 2022

LGTM.
Do we have any plan to move some logic to some files from sql/exec/mod.rs? The codes in it are getting more and more trivial :D

@leiysky
Copy link
Contributor Author

leiysky commented May 9, 2022

LGTM. Do we have any plan to move some logic to some files from sql/exec/mod.rs? The codes in it are getting more and more trivial :D

It's just somewhat glue code. I'm going to do some decouple work on the concepts PlanNode, Expression and Transform after migrating to new planner. After that, we will deal with these files.

@BohuTANG BohuTANG merged commit 5fdce0d into databendlabs:main May 9, 2022
@leiysky leiysky deleted the optimizer-hash-join branch May 9, 2022 06:00
@@ -65,4 +65,6 @@ drop table t;
drop table t1;
drop table t2;

select count(*) from numbers(1000) as t inner join numbers(1000) as t1 on t.number = t1.number;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is not working:

mysql> select * from numbers(1000) as t inner join numbers(1000) as t1 on t.number = t1.number;
ERROR 1105 (HY000): Code: 1002, displayText = Duplicate alias name :number (while in processor thread 0).

Copy link
Member

@BohuTANG BohuTANG May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is OK:

mysql> select t.number from numbers(1000) as t inner join numbers(1000) as t1 on t.number = t1.number;

Copy link
Member

@sundy-li sundy-li May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the same problem described in #5236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working need-review pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: COUNT(*) produce wrong result with joins in new planner
4 participants