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

Support create table xxx like yyy #2509

Closed
Gump9 opened this issue Sep 27, 2023 · 6 comments
Closed

Support create table xxx like yyy #2509

Gump9 opened this issue Sep 27, 2023 · 6 comments
Assignees
Labels
C-feature Category Features
Milestone

Comments

@Gump9
Copy link
Contributor

Gump9 commented Sep 27, 2023

What problem does the new feature solve?

When i migrate tests from DuckDB,I found that we don't support this statementcreate table xxx like yyy,now we must use show create table yyy statement first,and then copy the create statement of yyy to create xxx.Should we support this statement?
It seems that we can't copy constraint from yyy to xxx when we use create table xxx like yyy directly :
image

What does the feature do?

Support statement create table xxx like yyy

Implementation challenges

No response

@Gump9 Gump9 added the C-feature Category Features label Sep 27, 2023
@killme2008
Copy link
Contributor

It's a useful feature, let's move it to the following release plan.

@killme2008 killme2008 added this to the v0.7 milestone Jan 2, 2024
@killme2008 killme2008 self-assigned this Jan 2, 2024
@KKould
Copy link
Contributor

KKould commented Feb 22, 2024

I want to try to implement this

@tisonkun
Copy link
Contributor

@KKould this feature is nontrivial. What's your plan in implementing it?

@KKould
Copy link
Contributor

KKould commented Feb 23, 2024

@KKould this feature is nontrivial. What's your plan in implementing it?

I originally planned to refer to Statement::ShowCreateTable to get TableInfo to get CreateTableExpr and then call StatementExecutor:::create_table_inner. However, if this feature is important, I would be better off looking for some less important issues.

@waynexia
Copy link
Member

Sounds good. Let me assign it to you

@waynexia waynexia assigned KKould and unassigned killme2008 Feb 23, 2024
@KKould
Copy link
Contributor

KKould commented Feb 23, 2024

Sounds good. Let me assign it to you

I'll try to implement it this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features
Projects
None yet
Development

No branches or pull requests

5 participants