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
| Parameter | Type | Required | Description |
|---|---|---|---|
expr1 | T | Yes | First value |
expr2 | T | Yes | Second value |
Notes
- Same semantics as NOT DISPLAYS AS; use this registry entry when the source uses
IS DISTINCT FROMso FORMAT does not rewrite it - Unlike
!=, NULL is treated as comparable here NULL IS DISTINCT FROM NULLis 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 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |
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 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |