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-3176: introduce compact statement #3182

Merged
merged 8 commits into from
Dec 2, 2021

Conversation

dantengsky
Copy link
Member

@dantengsky dantengsky commented Dec 1, 2021

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

Summary

introduce the compact statement, which is a "syntax sugar" of "insert overwrite into T select * from T":

  COMPACT TABLE T == insert overwrite T select * from T

behind the scenes, data will be compacted during the insertion.

Changelog

  • Improvement
  • Not for changelog (changelog entry is not required)

Related Issues

Fixes #3176

Test Plan

Unit Tests

Stateless Tests

@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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2021

Codecov Report

Merging #3182 (1ffcf6d) into main (e0164f7) will decrease coverage by 0%.
The diff coverage is 87%.

Impacted file tree graph

@@          Coverage Diff           @@
##            main   #3182    +/-   ##
======================================
- Coverage     66%     66%    -1%     
======================================
  Files        673     675     +2     
  Lines      35709   36105   +396     
======================================
+ Hits       23878   24003   +125     
- Misses     11831   12102   +271     
Impacted Files Coverage Δ
query/src/sql/sql_statement.rs 70% <0%> (-2%) ⬇️
...uery/src/sql/statements/statement_compact_table.rs 65% <65%> (ø)
query/src/sql/sql_parser.rs 85% <83%> (-1%) ⬇️
query/src/storages/fuse/table_test.rs 93% <97%> (-1%) ⬇️
query/src/sql/statements/analyzer_statement.rs 92% <100%> (+<1%) ⬆️
query/src/storages/fuse/index/min_max_test.rs 91% <100%> (ø)
query/src/storages/fuse/table_test_fixture.rs 95% <100%> (+<1%) ⬆️
query/src/sql/statements/analyzer_expr.rs 61% <0%> (-2%) ⬇️
query/src/clusters/cluster.rs 53% <0%> (-2%) ⬇️
query/src/storages/memory/memory_table.rs 94% <0%> (-1%) ⬇️
... and 14 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 e0164f7...1ffcf6d. Read the comment docs.

@dantengsky dantengsky marked this pull request as ready for review December 2, 2021 01:08
@dantengsky dantengsky requested a review from BohuTANG as a code owner December 2, 2021 01:08
@Veeupup
Copy link
Contributor

Veeupup commented Dec 2, 2021

/lgtm

@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 @dantengsky

@databend-bot databend-bot merged commit 04bbc77 into databendlabs:main Dec 2, 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.

syntax sugar : compact table
5 participants