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

Add CREATE VIEW documentation to user guide #3211

Closed
andygrove opened this issue Aug 19, 2022 · 7 comments · Fixed by #3925
Closed

Add CREATE VIEW documentation to user guide #3211

andygrove opened this issue Aug 19, 2022 · 7 comments · Fixed by #3925
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@andygrove
Copy link
Member

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In docs/source/user-guide/sql/ddl.md we do not show that we support CREATE VIEW.

Describe the solution you'd like
Add docs

Describe alternatives you've considered
None

Additional context
None

@andygrove andygrove added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Aug 19, 2022
@madihabdul
Copy link

Hi, I could take on this issue!

@alamb
Copy link
Contributor

alamb commented Aug 20, 2022

Thanks @madihabdul !

@kmitchener
Copy link
Contributor

@madihabdul do you need some assistance with this issue? I'd be happy to help

@alamb
Copy link
Contributor

alamb commented Aug 31, 2022

@madihabdul do you need some assistance with this issue? I'd be happy to help

@kmitchener given there is no PR up if you don't hear from @madihabdul I would recommend just proceeding. Thank you for checking first.

@retikulum
Copy link
Contributor

Hi. As this issue is not closed or proceed, I will suggest following explanation for it. Is it enough?

CREATE VIEW

View is a virtual table based on the result of a SQL query. It can be created from an existing table or values list

CREATE VIEW view_name AS statement;
CREATE TABLE users AS VALUES(1,2),(2,3),(3,4),(4,5);
CREATE VIEW test AS SELECT column1 FROM users;
SELECT * FROM test;
+---------+
| column1 |
+---------+
| 1       |
| 2       |
| 3       |
| 4       |
+---------+
CREATE VIEW test AS VALUES(1,2),(5,6);
SELECT * FROM test;
+---------+---------+
| column1 | column2 |
+---------+---------+
| 1       | 2       |
| 5       | 6       |
+---------+---------+

@alamb
Copy link
Contributor

alamb commented Oct 21, 2022

Thanks @retikulum -- your proposal looks great to me. We can always add some documentation and then expand upon it in future PRs

@retikulum
Copy link
Contributor

I hope I will contribute datafusion more as I get used to codebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants