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

Distributed engine should support (omit) indexes in [AS TABLE_NAME] syntax #5241

Closed
den-crane opened this issue May 10, 2019 · 4 comments
Closed
Labels
comp-skipidx Data skipping indices feature st-community-taken External developer is working on that st-fixed usability

Comments

@den-crane
Copy link
Contributor

den-crane commented May 10, 2019

CREATE TABLE test1  (A Int64, Index i A TYPE minmax GRANULARITY 3) ENGINE = MergeTree() ORDER BY tuple()

CREATE TABLE test1_d as test1 ENGINE = Distributed(test, currentDatabase(), test1, rand());

DB::Exception: Engine Distributed doesn't support PARTITION BY, PRIMARY KEY, ORDER BY or SAMPLE BY clauses and skipping indices. Currently only the MergeTree family of engines supports them.

The same for Merge Engine:
CREATE TABLE test1_d as test1 ENGINE = MERGE (currentDatabase(),'^test1');

DB::Exception:Engine MERGE doesn't support PARTITION BY, PRIMARY KEY, ORDER BY or SAMPLE BY clauses and skipping indices. Currently only the MergeTree family of engines supports them.

@den-crane den-crane changed the title Distributed should support (omit) indexes in as syntax Distributed engine should support (omit) indexes in as syntax May 10, 2019
@den-crane den-crane changed the title Distributed engine should support (omit) indexes in as syntax Distributed engine should support (omit) indexes in [AS TABLE_NAME] syntax May 10, 2019
@nvartolomei
Copy link
Contributor

nvartolomei commented May 10, 2019

I’d rather move indexes out of the columns definition. Similar to how partitioning, primary key are defined. No?

This is more like a bug and not a feature request.

@den-crane
Copy link
Contributor Author

I’d rather move indexes out of the columns definition. Similar to how partitioning, primary key are defined. No?

This is more like a bug and not a feature request.

I agree and I really don't understand why indexes were placed in columns section and it broke backward compatibility for users with columns named index.

@filimonov filimonov added usability comp-skipidx Data skipping indices labels May 11, 2019
@alexey-milovidov
Copy link
Member

#6968

@alexey-milovidov alexey-milovidov added st-fixed st-community-taken External developer is working on that labels Nov 8, 2019
@alexey-milovidov
Copy link
Member

@den-crane
For two reasons:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-skipidx Data skipping indices feature st-community-taken External developer is working on that st-fixed usability
Projects
None yet
Development

No branches or pull requests

4 participants