mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-17 05:50:49 +00:00
d91c97d15d
* Replace underscores with hyphens * remove temporary code * fix style check * fix collapse
1.7 KiB
1.7 KiB
machine_translated | machine_translated_rev | toc_priority | toc_title |
---|---|---|---|
true | d734a8e46d |
46 | GenerateRandom |
Generaterandom
のgeneraterandomテーブルエンジンの生産ランダムなデータが与えられたテーブルのスキーマ.
使用例:
- 再現可能な大きいテーブルに住むテストの使用。
- ファジングテストのランダム入力を生成します。
Clickhouseサーバーでの使用状況
ENGINE = GenerateRandom(random_seed, max_string_length, max_array_length)
その max_array_length
と max_string_length
すべ
生成されたデータに対応する配列の列と文字列。
テーブル生成エンジンは SELECT
クエリ。
対応して データタイプ これは、以下を除いてテーブルに格納できます LowCardinality
と AggregateFunction
.
例えば:
1. セットアップ generate_engine_table
テーブル:
CREATE TABLE generate_engine_table (name String, value UInt32) ENGINE = GenerateRandom(1, 5, 3)
2. データのクエリ:
SELECT * FROM generate_engine_table LIMIT 3
┌─name─┬──────value─┐
│ c4xJ │ 1412771199 │
│ r │ 1791099446 │
│ 7#$ │ 124312908 │
└──────┴────────────┘
実装の詳細
- サポートなし:
ALTER
SELECT ... SAMPLE
INSERT
- 指数
- 複製