Skip to main content
Skip to main content

aggThrow

This function can be used for the purpose of testing exception safety. It will throw an exception on creation with the specified probability.

Syntax

Arguments

  • throw_prob — Probability to throw on creation. Float64.

Returned value

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

Example

Query:

Result:

Try ClickHouse Cloud for FREE

Separation of storage and compute, automatic scaling, built-in SQL console, and lots more. $300 in free credits when signing up.

Try it for Free