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

[ISSUE-2457] Support create table like statement #3292

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

junli1026
Copy link
Contributor

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

Summary

Support create like statement like, 'CREATE TABLE db1.test1 LIKE db2.test2', thus test1 will have the same schema as test2.

Changelog

  • Improvement

Related Issues

Fixes #2457

Test Plan

Unit Tests

Stateless Tests

@junli1026 junli1026 requested a review from BohuTANG as a code owner December 8, 2021 04:29
@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

1 similar comment
@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@vercel
Copy link

vercel bot commented Dec 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/databend/databend/HZe5CzR236SHV2DLg2KRb8PV2z8Q
✅ Preview: https://databend-git-fork-junli1026-jun-dev-databend.vercel.app

@mergify
Copy link
Contributor

mergify bot commented Dec 8, 2021

This pull request has merge conflicts that must be resolved before it can be merged. @junli1026 please rebase it 🙏

@junli1026 junli1026 changed the title Support create table like statement [ISSUE-2457] Support create table like statement Dec 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2021

Codecov Report

Merging #3292 (cc6315a) into main (5392ace) will decrease coverage by 0%.
The diff coverage is 79%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3292   +/-   ##
=====================================
- Coverage     65%     65%   -1%     
=====================================
  Files        708     708           
  Lines      38485   38525   +40     
=====================================
- Hits       25052   25051    -1     
- Misses     13433   13474   +41     
Impacted Files Coverage Δ
query/src/sql/parser/ast/statement.rs 47% <0%> (-1%) ⬇️
query/src/sql/statements/statement_create_table.rs 84% <77%> (-7%) ⬇️
query/src/sql/sql_parser.rs 86% <83%> (+<1%) ⬆️
.../src/sql/parser/transformer/transform_sqlparser.rs 48% <84%> (+<1%) ⬆️
query/src/sql/sql_parser_test.rs 78% <85%> (+<1%) ⬆️
query/src/sql/parser/ast/ast_display_test.rs 85% <100%> (+<1%) ⬆️
query/src/common/mod.rs 70% <0%> (-15%) ⬇️
cli/src/error.rs 29% <0%> (-4%) ⬇️
...pelines/transforms/transform_aggregator_partial.rs 86% <0%> (-2%) ⬇️
metasrv/src/meta_service/meta_service_impl.rs 76% <0%> (-1%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5392ace...cc6315a. Read the comment docs.

@BohuTANG BohuTANG requested a review from sundy-li December 8, 2021 06:31
@databend-bot
Copy link
Member

Wait for another reviewer approval

@databend-bot
Copy link
Member

CI Passed
Reviewers Approved
Let's Merge
Thank you for the PR @junli1026

@databend-bot databend-bot merged commit 0aaea53 into databendlabs:main Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support create table as/like query
5 participants