Boolean functions

This page describes the available functions to assist with performing boolean calculations on numeric and timestamp types.

isOrdered

isOrdered(column) return a boolean indicating whether the column values are ordered in a table.

Arguments:

  • column is a column name of numeric or timestamp type.

Return value:

Return value type is boolean.

Examples:

Given a table with the following contents:

numeric_sequencets
12021-05-01T11:00:00.000000Z
22021-05-01T12:00:00.000000Z
32021-05-01T13:00:00.000000Z
SELECT isOrdered(numeric_sequence) is_num_ordered,
isOrdered(ts) is_ts_ordered
FROM my_table
is_num_orderedis_ts_ordered
truetrue

Adding an integer and timestamp rows out-of-order

numeric_sequencets
12021-05-01T11:00:00.000000Z
22021-05-01T12:00:00.000000Z
32021-05-01T13:00:00.000000Z
22021-05-01T12:00:00.000000Z
SELECT isOrdered(numeric_sequence) FROM my_table
is_num_orderedis_ts_ordered
falsefalse

SELECT boolean expressions

If you'd like to apply boolean logic in your SELECT expressions, see the SELECT reference.