2024-06-23 05:02:58 +00:00
|
|
|
-- https://github.com/ClickHouse/ClickHouse/issues/65548
|
|
|
|
DROP TABLE IF EXISTS test_projection_deduplicate;
|
|
|
|
|
|
|
|
CREATE TABLE test_projection_deduplicate
|
|
|
|
(
|
|
|
|
`id` Int32,
|
|
|
|
`string` String,
|
|
|
|
PROJECTION test_projection
|
|
|
|
(
|
|
|
|
SELECT id
|
|
|
|
GROUP BY id
|
|
|
|
)
|
|
|
|
)
|
|
|
|
ENGINE = MergeTree
|
|
|
|
PRIMARY KEY id;
|
|
|
|
|
|
|
|
INSERT INTO test_projection_deduplicate VALUES (1, 'one');
|
|
|
|
INSERT INTO test_projection_deduplicate VALUES (1, 'one');
|
|
|
|
|
2024-07-31 23:06:53 +00:00
|
|
|
OPTIMIZE TABLE test_projection_deduplicate DEDUPLICATE; -- { serverError SUPPORT_IS_DISABLED }
|
2024-06-23 05:02:58 +00:00
|
|
|
|
|
|
|
SELECT * FROM test_projection_deduplicate;
|
|
|
|
|
2024-07-04 21:51:57 +00:00
|
|
|
ALTER TABLE test_projection_deduplicate DROP PROJECTION test_projection;
|
|
|
|
|
|
|
|
OPTIMIZE TABLE test_projection_deduplicate DEDUPLICATE;
|
|
|
|
|
|
|
|
SELECT * FROM test_projection_deduplicate;
|
|
|
|
|
2024-06-23 05:02:58 +00:00
|
|
|
DROP TABLE test_projection_deduplicate;
|