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

feat(planner): support common table expression(CTE) #7056

Merged
merged 8 commits into from
Aug 11, 2022

Conversation

xudong963
Copy link
Member

@xudong963 xudong963 commented Aug 9, 2022

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

Summary

Support CTE in planner.

Note: we don't support recursive CTE currently.

In the future, we can optimize CTE, there is a proposal: #7061

Fixes #6246

@vercel
Copy link

vercel bot commented Aug 9, 2022

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

Name Status Preview Updated
databend ✅ Ready (Inspect) Visit Preview Aug 11, 2022 at 4:03AM (UTC)

@xudong963 xudong963 marked this pull request as draft August 9, 2022 17:22
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Aug 9, 2022
@xudong963 xudong963 marked this pull request as ready for review August 10, 2022 07:28
@sundy-li sundy-li requested a review from fkuner August 10, 2022 13:14
@xudong963 xudong963 requested a review from leiysky August 10, 2022 14:09
@fkuner
Copy link
Contributor

fkuner commented Aug 11, 2022

Maybe we can add more tests to verify it. I wrote some tests from clickhouse in thsi pr simple cte. You can verity it.

@mergify mergify bot merged commit b92dd3a into databendlabs:main Aug 11, 2022
@xudong963 xudong963 deleted the cte3 branch August 11, 2022 04:30
@BohuTANG
Copy link
Member

BohuTANG commented Aug 11, 2022

For documentation for common table expression(CTE) , cc @soyeric128

Reference:
snow: https://docs.snowflake.com/en/user-guide/queries-cte.html
mysql: https://dev.mysql.com/doc/refman/8.0/en/with.html#common-table-expressions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CTE(Common Table Expression)
5 participants