2023-09-19 15:08:15 +00:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
|
|
|
|
CREATE TABLE t1
|
|
|
|
(
|
2023-09-26 17:16:01 +00:00
|
|
|
a Float64 STATISTIC(tdigest),
|
|
|
|
b Int64 STATISTIC(tdigest),
|
2023-09-19 15:08:15 +00:00
|
|
|
pk String,
|
|
|
|
) Engine = MergeTree() ORDER BY pk; -- { serverError INCORRECT_QUERY }
|
|
|
|
|
|
|
|
SET allow_experimental_statistic = 1;
|
|
|
|
|
|
|
|
CREATE TABLE t1
|
|
|
|
(
|
2023-09-26 17:16:01 +00:00
|
|
|
a Float64 STATISTIC(tdigest),
|
2023-09-19 15:08:15 +00:00
|
|
|
b Int64,
|
2023-09-26 17:16:01 +00:00
|
|
|
pk String STATISTIC(tdigest),
|
2023-09-19 15:08:15 +00:00
|
|
|
) Engine = MergeTree() ORDER BY pk; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
|
|
|
|
CREATE TABLE t1
|
|
|
|
(
|
2023-09-26 17:16:01 +00:00
|
|
|
a Float64 STATISTIC(tdigest, tdigest(10)),
|
2023-09-19 15:08:15 +00:00
|
|
|
b Int64,
|
2023-09-26 17:16:01 +00:00
|
|
|
) Engine = MergeTree() ORDER BY pk; -- { serverError INCORRECT_QUERY }
|
2023-09-19 15:08:15 +00:00
|
|
|
|
2023-09-27 15:59:53 +00:00
|
|
|
CREATE TABLE t1
|
|
|
|
(
|
|
|
|
a Float64 STATISTIC(xyz),
|
|
|
|
b Int64,
|
|
|
|
) Engine = MergeTree() ORDER BY pk; -- { serverError INCORRECT_QUERY }
|
|
|
|
|
2023-09-19 15:08:15 +00:00
|
|
|
CREATE TABLE t1
|
|
|
|
(
|
|
|
|
a Float64,
|
|
|
|
b Int64,
|
|
|
|
pk String,
|
|
|
|
) Engine = MergeTree() ORDER BY pk;
|
|
|
|
|
2023-09-27 15:59:53 +00:00
|
|
|
ALTER TABLE t1 ADD STATISTIC a TYPE xyz; -- { serverError INCORRECT_QUERY }
|
2023-09-19 15:08:15 +00:00
|
|
|
ALTER TABLE t1 ADD STATISTIC a TYPE tdigest;
|
2023-09-26 17:16:01 +00:00
|
|
|
ALTER TABLE t1 ADD STATISTIC a TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
ALTER TABLE t1 ADD STATISTIC pk TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
ALTER TABLE t1 DROP STATISTIC b TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
ALTER TABLE t1 DROP STATISTIC a TYPE tdigest;
|
|
|
|
ALTER TABLE t1 DROP STATISTIC a TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
ALTER TABLE t1 CLEAR STATISTIC a TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
|
|
|
ALTER TABLE t1 MATERIALIZE STATISTIC b TYPE tdigest; -- { serverError ILLEGAL_STATISTIC }
|
2023-09-19 15:08:15 +00:00
|
|
|
|
2023-10-11 14:57:40 +00:00
|
|
|
ALTER TABLE t1 ADD STATISTIC a TYPE tdigest;
|
|
|
|
ALTER TABLE t1 ADD STATISTIC b TYPE tdigest;
|
2023-12-08 19:55:11 +00:00
|
|
|
ALTER TABLE t1 MODIFY COLUMN a Float64 TTL toDateTime(b) + INTERVAL 1 MONTH;
|
2023-10-11 14:57:40 +00:00
|
|
|
ALTER TABLE t1 MODIFY COLUMN a Int64; -- { serverError ALTER_OF_COLUMN_IS_FORBIDDEN }
|
|
|
|
|
2023-09-19 15:08:15 +00:00
|
|
|
DROP TABLE t1;
|