ClickHouse/tests/queries/0_stateless/02816_check_projection_metadata.sql
Nikolai Kochetov b5cf644668
Check projection metadata the same way we check ordinary metadata. (#52361)
* Check projection metadata the same way we check ordinary metadata.

* Allow aggregate projection to have empty PK

---------

Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-07-21 16:23:04 +03:00

4 lines
357 B
SQL

create table kek (uuid FixedString(16), id int, ns String, dt DateTime64(6), projection null_pk (select * order by ns, 1, 4)) engine=MergeTree order by (id, dt, uuid); -- {serverError ILLEGAL_COLUMN }
-- this query could segfault or throw LOGICAL_ERROR previously, when we did not check projection PK
-- insert into kek select * from generageRandom(10000);