IS [NOT] FALSE
Tests whether the input expression is FALSE or not FALSE, and is an alias for the ISFALSE and ISNOTFALSE functions. ISFALSE returns TRUE if the input expression evaluates to FALSE and FALSE if the input is TRUE or NULL. ISNOTFALSE returns TRUE if the input expression is TRUE or NULL and FALSE only if the input is FALSE.
Syntax
IS [NOT] FALSE(boolean_expression boolean) → boolean
- boolean_expression: The input expression, which must be of type
BOOLEAN.
Examples
Create a table containing one column of boolean data typeCREATE TABLE <catalog-name>.test_table
(
test_column BOOLEAN
)
-- true, Table created
INSERT INTO <catalog-name>.test_table
VALUES (true),
(false)
-- Fragment, Records, Path, Metadata, Partition, FileSize, IcebergMetadata, fileschema, PartitionData
-- 0_0, 1, s3://<s3-bucket-path>, , 0, <file-size>, <iceberg-metadata>, <file-schema>, null
SELECT ISFALSE(test_column)
FROM <catalog-name>.test_table
-- false
-- true
SELECT ISFALSE(NULL)
-- false
SELECT ISNOTFALSE(test_column)
FROM <catalog-name>.test_table
-- true
-- false
SELECT ISNOTFALSE(NULL)
-- true