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

feat: not show SNAPSHOT_LOCATION when show create table #10132

Closed
BohuTANG opened this issue Feb 20, 2023 · 8 comments
Closed

feat: not show SNAPSHOT_LOCATION when show create table #10132

BohuTANG opened this issue Feb 20, 2023 · 8 comments
Assignees
Labels
C-feature Category: feature good first issue Category: good first issue

Comments

@BohuTANG
Copy link
Member

Summary

show create table t1;
CREATE TABLE t1` (  `name` VARCHAR) ENGINE=FUSE SNAPSHOT_LOCATION='584180/584234/_ss/523697ab87b140e68076a288b8a16494_v2.json'

If the user COPY and create a new table, SNAPSHOT_LOCATION will break the table, we should ignore this option with a new setting: show_option_in_show_create_table, default is false.

@BohuTANG BohuTANG added C-feature Category: feature good first issue Category: good first issue labels Feb 20, 2023
@xinlifoobar
Copy link
Contributor

May I pick this as the first issue? Some followups:

  • If 2 tables use the same SNAPSHOT_LOCATION, then they are actually referencing the same table, is this just by design?
  • Shall the settings be a QueryConfig, just confused about the settings sections.

@BohuTANG
Copy link
Member Author

BohuTANG commented Feb 21, 2023

  • If 2 tables use the same SNAPSHOT_LOCATION, then they are actually referencing the same table, is this just by design?

Yes.

  • Shall the settings be a QueryConfig, just confused about the settings sections.

No, you can reference this PR: how to add a new settings #9406

A setting can be changed in the runtime but a config not, config must configured in the databend-query.toml file.

@xinlifoobar
Copy link
Contributor

xinlifoobar commented Feb 22, 2023

Thanks.

Based on the above, the show_option_in_show_create_table should be a boolean value, instead of a list. How about creating a new setting named hide_option_in_show_create_table and the value is a comma-separated list default to SNAPSHOT_LOCATION? This way it acts as table_keys.rs

@BohuTANG
Copy link
Member Author

How about creating a new setting named hide_option_in_show_create_table

Good. We can make the hide_option_in_show_create_table default to false.

the value is a comma-separated list default to SNAPSHOT_LOCATION

We should hide all the options lists in the table_keys.rs

@xinlifoobar
Copy link
Contributor

This PR expresses my idea regards hide_options_in_show_create_table to introduce a comma-separated list... I somehow get the idea to use one boolean to control all options. If this is not common practice plz let me know...

@johnhaxx7
Copy link
Contributor

ping for close, thanks!

@xinlifoobar
Copy link
Contributor

Hi @johnhaxx7, it seems I don't have perms to close. Any groups needs to join?

@sundy-li
Copy link
Member

You can use close #xxx in the pr, if pr is merged, this issue will be closed.

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

No branches or pull requests

4 participants