aggThrow
Introducido en: v20.1.0
Esta función puede utilizarse para probar la seguridad ante excepciones. Lanzará una excepción al crearse con la probabilidad especificada.
Sintaxis
aggThrow(throw_prob)Argumentos
throw_prob— Probabilidad de lanzar una excepción durante la creación.Float64
Valor devuelto
Devuelve una excepción: Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully.
Ejemplos
Ejemplo de uso
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)