IS_DISTINCT_FROM()

All functions > COMPARISON > IS_DISTINCT_FROM()

Returns TRUE if two values are distinct, treating NULL values as comparable (SQL spelling).

Signatures

Returns: Null-safe equality / inequality result

IS_DISTINCT_FROM(expr1: T, expr2: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1TYesFirst value
expr2TYesSecond value

Notes

  • Same semantics as NOT DISPLAYS AS; use this registry entry when the source uses IS DISTINCT FROM so FORMAT does not rewrite it
  • Unlike !=, NULL is treated as comparable here
  • NULL IS DISTINCT FROM NULL is FALSE
  • Operand types must match structurally (including ARRAY/ROW)

Related operators

See also

Examples

IS_DISTINCT_FROM — functional call

FeatureQL
SELECT
    f1 := IS_DISTINCT_FROM(1, 2), -- `IS_DISTINCT_FROM(expr1, expr2)` matches SQL spelling
    f2 := IS_DISTINCT_FROM(1, 1) -- Same value is not distinct
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

IS_DISTINCT_FROM — chained

FeatureQL
SELECT
    f1 := (1).IS_DISTINCT_FROM(2), -- Receiver is the left-hand operand
    f2 := (1).IS_DISTINCT_FROM(1) -- Same semantics as the prefix call
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

Last update at: 2026/05/26 17:22:09