ClickHouse/tests/queries/0_stateless/01277_random_fixed_string.sql
2024-05-30 19:41:08 +00:00

6 lines
479 B
SQL

SELECT randomFixedString('string'); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
SELECT randomFixedString(0); -- { serverError ARGUMENT_OUT_OF_BOUND }
SELECT randomFixedString(rand() % 10); -- { serverError ILLEGAL_COLUMN }
SELECT toTypeName(randomFixedString(10));
SELECT DISTINCT c > 30000 FROM (SELECT arrayJoin(arrayMap(x -> reinterpretAsUInt8(substring(randomFixedString(100), x + 1, 1)), range(100))) AS byte, count() AS c FROM numbers(100000) GROUP BY byte ORDER BY byte);