datafuselabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.31k stars 704 forks source link

ISSUE-2039: rm param "database" from get_table_by_id #2155

Closed dantengsky closed 2 years ago

dantengsky commented 2 years ago

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

Summary

    fn get_table_by_id(
        &self,
        table_id: MetaId,
        table_version: Option<MetaVersion>,
    ) -> Result<Arc<TableMeta>>;

the "database_name" parameter has been removed.

NOTE:

  1. add database_name and table_name to struct common/meta/types/Table
  2. added annotation #[allow(clippy::large_enum_variant)] to pub enum AppliedState to disable the warning variant is 400 bytes

Changelog

Related Issues

Fixes #2039

Test Plan

Unit Tests

Stateless Tests

databend-bot commented 2 years ago

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 commented 2 years ago

Codecov Report

Merging #2155 (f1a8e2a) into master (a3db024) will increase coverage by 0%. The diff coverage is 57%.

:exclamation: Current head f1a8e2a differs from pull request most recent head a00fdb3. Consider uploading reports for the commit a00fdb3 to get more accurate results Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2155   +/-   ##
======================================
  Coverage      67%     67%           
======================================
  Files         633     632    -1     
  Lines       35689   35681    -8     
======================================
+ Hits        24190   24192    +2     
+ Misses      11499   11489   -10     
Impacted Files Coverage Δ
...meta/raft-store/src/state_machine/applied_state.rs 25% <ø> (ø)
common/meta/raft-store/src/state_machine/sm.rs 75% <0%> (-2%) :arrow_down:
metasrv/src/executor/meta_handlers.rs 3% <0%> (-1%) :arrow_down:
query/src/catalogs/catalog.rs 0% <ø> (ø)
...atalogs/impls/meta_backends/remote_meta_backend.rs 0% <0%> (ø)
...c/datasources/database/default/default_database.rs 76% <0%> (ø)
...alogs/impls/meta_backends/embedded_meta_backend.rs 83% <83%> (ø)
...ry/src/catalogs/impls/catalog/metastore_catalog.rs 87% <100%> (+<1%) :arrow_up:
...ery/src/catalogs/impls/catalog/overlaid_catalog.rs 93% <100%> (-1%) :arrow_down:
query/src/catalogs/impls/catalog/system_catalog.rs 77% <100%> (+2%) :arrow_up:
... and 22 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 a3db024...a00fdb3. Read the comment docs.

drmingdrmer commented 2 years ago

@ariesdevil This change of API will affect the internal impl of meta-service.

ariesdevil commented 2 years ago

@ariesdevil This change of API will affect the internal impl of meta-service.

Got it.

drmingdrmer commented 2 years ago

/lgtm

Love it

databend-bot commented 2 years ago

Approved! Thank you for the PR @dantengsky

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge

databend-bot commented 2 years ago

CI Passed Reviewer Approved Let's Merge