Skip to main content

Logical Operators

This section introduces the logical operators supported by Apache Kylin. The values of logical propositions are TRUE, FALSE, and UNKNOWN. The following boolean refers to a logical proposition.

OperatorDescriptionSyntaxExample
ANDWhether boolean1 and boolean2 are both TRUEboolean1 AND boolean2Name ='frank' AND gender='M'
ORWhether boolean1 is TRUE or boolean2 is TRUEboolean1 OR boolean2Name='frank' OR Name='Hentry'
NOTWhether boolean is not TRUE; returns UNKNOWN if boolean is UNKNOWNNOT booleanNOT (NAME ='frank')
IS FALSEWhether boolean is FALSE; returns FALSE if boolean is UNKNOWNboolean IS FALSEName ='frank' IS FALSE
IS NOT FALSEWhether boolean is not FALSE; returns TRUE if boolean is UNKNOWNboolean IS NOT FALSEName ='frank' IS NOT FALSE
IS TRUEWhether boolean is TRUE; returns FALSE if boolean is UNKNOWNboolean IS TRUEName ='frank' IS TRUE
IS NOT TRUEWhether boolean is not TRUE; returns TRUE if boolean is UNKNOWNboolean IS NOT TRUEName ='frank' IS NOT TRUE