aggThrow
Introduit dans : v20.1.0
Cette fonction peut être utilisée pour tester la sécurité vis-à-vis des exceptions. Elle lève une exception lors de sa création avec la probabilité spécifiée.
Syntaxe
aggThrow(throw_prob)Arguments
throw_prob— Probabilité qu'une exception soit levée lors de la création.Float64
Valeur renvoyée
Renvoie une exception : Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully.
Exemples
Exemple d'utilisation
SELECT number % 2 AS even, aggThrow(number) FROM numbers(10) GROUP BY even;Received exception:
Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully: While executing AggregatingTransform. (AGGREGATE_FUNCTION_THROW)