IS_NOT_ERROR (Lakehouse v1)
Renvoie une valeur booléenne indiquant si une expression est une valeur d’erreur.
Voir aussi : IS_ERROR
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.is_error( <expr> )Exemples Analyze
Section intitulée « Exemples Analyze »# Indicates division by zero, hence an errorfunc.is_error((1 / 0)), func.is_not_error((1 / 0))
┌─────────────────────────────────────────────────────┐│ func.is_error((1 / 0)) │ func.is_not_error((1 / 0)) │├────────────────────────┼────────────────────────────┤│ true │ false │└─────────────────────────────────────────────────────┘
# The conversion to DATE is successful, hence not an errorfunc.is_error(func.to_date('2024-03-17')), func.is_not_error(func.to_date('2024-03-17'))
┌───────────────────────────────────────────────────────────────────────────────────────────┐│ func.is_error(func.to_date('2024-03-17')) │ func.is_not_error(func.to_date('2024-03-17')) │├───────────────────────────────────────────┼───────────────────────────────────────────────┤│ false │ true │└───────────────────────────────────────────────────────────────────────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »IS_NOT_ERROR( <expr> )Type de retour
Section intitulée « Type de retour »Renvoie true si l’expression n’est pas une erreur, sinon false.
Exemples SQL
Section intitulée « Exemples SQL »-- Indicates division by zero, hence an errorSELECT IS_ERROR(1/0), IS_NOT_ERROR(1/0);
┌───────────────────────────────────────────┐│ is_error((1 / 0)) │ is_not_error((1 / 0)) │├───────────────────┼───────────────────────┤│ true │ false │└───────────────────────────────────────────┘
-- The conversion to DATE is successful, hence not an errorSELECT IS_ERROR('2024-03-17'::DATE), IS_NOT_ERROR('2024-03-17'::DATE);
┌─────────────────────────────────────────────────────────────────┐│ is_error('2024-03-17'::date) │ is_not_error('2024-03-17'::date) │├──────────────────────────────┼──────────────────────────────────┤│ false │ true │└─────────────────────────────────────────────────────────────────┘