The functions below perform logical operations on arguments of arbitrary numeric types. They return eitherDocumentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
0 or 1 as UInt8 or in some cases NULL.
Zero as an argument is considered false, non-zero values are considered true.
and
Introduced in: v1.1.0 Calculates the logical conjunction of two or more values. Settingshort_circuit_function_evaluation controls whether short-circuit evaluation is used.
If enabled, val_i is evaluated only if (val_1 AND val_2 AND ... AND val_{i-1}) is true.
For example, with short-circuit evaluation, no division-by-zero exception is thrown when executing the query SELECT and(number = 2, intDiv(1, number)) FROM numbers(5).
Zero as an argument is considered false, non-zero values are considered true.
Syntax
val1, val2[, ...]— List of at least two values.Nullable((U)Int*)orNullable(Float*)
0, if at least one argument evaluates tofalseNULL, if no argument evaluates tofalseand at least one argument isNULL1, otherwiseNullable(UInt8)
Query
Response
Query
Response
not
Introduced in: v1.1.0 Calculates the logical negation of a value. Zero as an argument is consideredfalse, non-zero values are considered true.
Syntax
1, ifvalevaluates tofalse0, ifvalevaluates totrueNULL, ifvalisNULL.Nullable(UInt8)
Query
Response
or
Introduced in: v1.1.0 Calculates the logical disjunction of two or more values. Settingshort_circuit_function_evaluation controls whether short-circuit evaluation is used.
If enabled, val_i is evaluated only if ((NOT val_1) AND (NOT val_2) AND ... AND (NOT val_{i-1})) is true.
For example, with short-circuit evaluation, no division-by-zero exception is thrown when executing the query SELECT or(number = 0, intDiv(1, number) != 0) FROM numbers(5).
Zero as an argument is considered false, non-zero values are considered true.
Syntax
val1, val2[, ...]— List of at least two values.Nullable((U)Int*)orNullable(Float*)
1, if at least one argument evaluates totrue0, if all arguments evaluate tofalseNULL, if all arguments evaluate tofalseand at least one argument isNULLNullable(UInt8)
Query
Response
Query
Response
xor
Introduced in: v1.1.0 Calculates the logical exclusive disjunction of two or more values. For more than two input values, the function first xor-s the first two values, then xor-s the result with the third value etc. Zero as an argument is consideredfalse, non-zero values are considered true.
Syntax
val1, val2[, ...]— List of at least two values.Nullable((U)Int*)orNullable(Float*)
1, for two values: if one of the values evaluates tofalseand other does not0, for two values: if both values evaluate tofalseor to bothtrueNULL, if at least one of the inputs isNULL.Nullable(UInt8)
Query
Response