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

[DOC] - There are unsupported DDL in the official documentation #3904

Closed
francis-du opened this issue Oct 20, 2022 · 3 comments · Fixed by #3932
Closed

[DOC] - There are unsupported DDL in the official documentation #3904

francis-du opened this issue Oct 20, 2022 · 3 comments · Fixed by #3932
Labels
bug Something isn't working

Comments

@francis-du
Copy link
Contributor

Describe the bug

Found an error when I run this DDL:

CREATE TABLE valuetable IF NOT EXISTS AS VALUES(1,'HELLO'),(12,'DATAFUSION'); 

Error:

image

Docs: https://arrow.apache.org/datafusion/user-guide/sql/ddl.html

@francis-du francis-du added the bug Something isn't working label Oct 20, 2022
@alamb
Copy link
Contributor

alamb commented Oct 22, 2022

I think the right syntax is CREATE TABLE IF NOT EXISTST

❯ CREATE TABLE IF NOT EXISTS valuetable AS VALUES(1,'HELLO'),(12,'DATAFUSION'); 
0 rows in set. Query took 0.003 seconds.

@jackwener
Copy link
Member

CREATE [OR REPLACE] TABLE [IF NOT EXISTS] table_name AS [SELECT | VALUES LIST];

Doc is right, you have missed table_name.

@alamb
Copy link
Contributor

alamb commented Oct 23, 2022

I think the problem is with this example from https://arrow.apache.org/datafusion/user-guide/sql/ddl.html

CREATE TABLE valuetable IF NOT EXISTS AS VALUES(1,'HELLO'),(12,'DATAFUSION');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants