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

chore: add rule and test #851

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

caicancai
Copy link
Contributor

@caicancai caicancai commented Jun 1, 2024

I noticed that risinglight uses egg for CBO optimization, but it looks violent at the moment. I will try to optimize it.

Signed-off-by: caicancai <[email protected]>
@caicancai caicancai changed the title chore: add rule test chore: add rule and test Jun 1, 2024
@caicancai
Copy link
Contributor Author

cc @wangrunji0408 If you have time, could you help me review this PR? Thank you.

"
proj (list $1.2)
(limit 10 0
(order (list)
Copy link
Member

Choose a reason for hiding this comment

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

This is an empty ordering. Should be (order (list $1.2) ..)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fix
But the fact that rust test can pass means there is still room for improvement. I will find time to improve it.

Signed-off-by: caicancai <[email protected]>
@caicancai caicancai requested a review from wangrunji0408 June 3, 2024 14:03
@caicancai
Copy link
Contributor Author

caicancai commented Jun 5, 2024

@wangrunji0408 PATL, thank you

Co-authored-by: Runji Wang <[email protected]>
Signed-off-by: Cancai Cai <[email protected]>
@caicancai
Copy link
Contributor Author

@wangrunji0408 I would like to ask a question, can egg+sql optimization be extracted into a separate framework and then integrated with calcite? Do you think this is feasible?

@wangrunji0408
Copy link
Member

can egg+sql optimization be extracted into a separate framework and then integrated with calcite? Do you think this is feasible?

I'm not sure as the Calcite is written in Java while egg is designed for Rust. Besides, what's the purpose of doing this? As far as I know, the Calcite itself is a framework for optimization. I have always thought of egg as a Rust alternative of Calcite.

@caicancai
Copy link
Contributor Author

I'm not sure as the Calcite is written in Java while egg is designed for Rust. Besides, what's the purpose of doing this? As far as I know, the Calcite itself is a framework for optimization. I have always thought of egg as a Rust alternative of Calcite.

I think it is a bit complicated to expand an optimization rule in Calcite at present, and it is not as convenient as egg. My original intention is to make Calcite more convenient to use.

Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

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

Thanks!

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Jun 7, 2024
Merged via the queue into risinglightdb:main with commit 50b2556 Jun 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants