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

fix: avoid dependency loop when selecting from view. #10650

Merged
merged 2 commits into from
Mar 19, 2023

Conversation

RinChanNOWWW
Copy link
Contributor

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

Summary

Check dependency when selecting from view.

Closes #10625

@vercel
Copy link

vercel bot commented Mar 19, 2023

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

Name Status Preview Comments Updated
databend ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 19, 2023 at 9:32AM (UTC)

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Mar 19, 2023
@BohuTANG
Copy link
Member

@mergify update

@mergify
Copy link
Contributor

mergify bot commented Mar 19, 2023

update

✅ Branch has been successfully updated

@BohuTANG BohuTANG merged commit 0564a78 into datafuselabs:main Mar 19, 2023
drop view if exists loop_view3;

statement ok
create view loop_view1 as select * from loop_view3;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we check the loop when create view ?

postgres=# create view v_t as select * from v_t;
ERROR:  relation "v_t" does not exist
LINE 1: create view v_t as select * from v_t;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid not in current implementation. Because when creating a view, we just store the SQL string.

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

Successfully merging this pull request may close these issues.

bug: Select view should add dependency check
5 participants