Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56331 from ucasfl/alter
Support create and materialized index in the same alter query
- Loading branch information
Showing
3 changed files
with
40 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
18 changes: 18 additions & 0 deletions
18
tests/queries/0_stateless/02911_add_index_and_materialize_index.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- Tags: no-replicated-database | ||
|
||
DROP TABLE IF EXISTS index_test; | ||
|
||
CREATE TABLE index_test | ||
( | ||
x UInt32, | ||
y UInt32, | ||
z UInt32 | ||
) ENGINE = MergeTree order by x; | ||
|
||
ALTER TABLE index_test | ||
ADD INDEX i_x mortonDecode(2, z).1 TYPE minmax GRANULARITY 1, | ||
ADD INDEX i_y mortonDecode(2, z).2 TYPE minmax GRANULARITY 1, | ||
MATERIALIZE INDEX i_x, | ||
MATERIALIZE INDEX i_y; | ||
|
||
drop table index_test; |