メインコンテンツまでスキップ
メインコンテンツまでスキップ

aggThrow

この関数は例外安全性をテストする目的で使用できます。指定された確率で作成時に例外を投げます。

構文

aggThrow(throw_prob)

引数

  • throw_prob — 作成時に投げる確率。Float64

返される値

  • 例外: Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully

クエリ:

SELECT number % 2 AS even, aggThrow(number) FROM numbers(10) GROUP BY even;

結果:

受信した例外:
Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully: While executing AggregatingTransform. (AGGREGATE_FUNCTION_THROW)