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

[RFC] Introduce create_as_skip_indices #6968

Merged
merged 2 commits into from
Sep 20, 2019

Conversation

azat
Copy link
Collaborator

@azat azat commented Sep 17, 2019

Category (leave one):

  • New Feature

Short description (up to few sentences):

Useful to create Distributed/Buffer table using CREATE TABLE ... AS ...
for MergeTree family tables.

@alexey-milovidov
Copy link
Member

alexey-milovidov commented Sep 17, 2019

The problem is clear.

The proposed solution with setting has downside: the user should know about this setting and should enable it.

Wouldn't it be better to add IStorage::supportSecondaryIndices method and ignore indices if storage is created AS and indices are not supported?

@azat
Copy link
Collaborator Author

azat commented Sep 17, 2019

the user should know about this setting and should enable it.

Indeed, plus it is hard to keep all this settings in mind

Wouldn't it be better to add IStorage::supportSecondaryIndices method and ignore indices if storage is created AS and indices are not supported?

Agree, will update the patch

@azat
Copy link
Collaborator Author

azat commented Sep 18, 2019

Wouldn't it be better to add IStorage::supportSecondaryIndices method and ignore indices if storage is created AS and indices are not supported?

Hm, we do not have Storage yet during parsing the query (and filling indexes), and during creating Storage we do not have AS flag (for now), so I'm thinking about just check against "MergeTree" in InterpreterCreateQuery::setProperties, or do you have strong feelings against this?

@alexey-milovidov
Copy link
Member

It's Ok. Added a comment.

@alexey-milovidov alexey-milovidov merged commit f8d19f6 into ClickHouse:master Sep 20, 2019
@azat azat deleted the create_as_skip_indices branch September 20, 2019 23:26
@tavplubix tavplubix added the pr-feature Pull request with new product feature label Nov 18, 2019
azat added a commit to azat/ClickHouse that referenced this pull request Feb 28, 2022
… support it

Follow-up for: ClickHouse#6968
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
lgbo-ustc pushed a commit to bigo-sg/ClickHouse that referenced this pull request Mar 1, 2022
… support it

Follow-up for: ClickHouse#6968
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants