NOT_DISPLAYS_AS()
All functions > COMPARISON > NOT_DISPLAYS_AS()
Returns TRUE if two values are distinct, treating NULL values as comparable.
Signatures
Returns: Null-safe equality / inequality result
NOT_DISPLAYS_AS(expr1: T, expr2: T) → BOOLEAN sql
| Parameter | Type | Required | Description |
|---|---|---|---|
expr1 | T | Yes | First value |
expr2 | T | Yes | Second value |
Notes
- Unlike
!=, NULL is treated as comparable here (three-valued logic does not apply the same way) NULL NOT DISPLAYS AS NULLis FALSE (they are not distinct)value NOT DISPLAYS AS NULLis TRUE when value is not NULLNULL NOT DISPLAYS AS valueis TRUE when value is not NULL- Both values must be of the same type (including ARRAY/ROW; element and field types must match)
- FeatureQL-native spelling; SQL
IS DISTINCT FROMis registered separately so format/querytools match the syntax you used
Related operators
See also
Examples
NOT_DISPLAYS_AS — functional call
FeatureQL
SELECT
f1 := NOT_DISPLAYS_AS(1, 2), -- `NOT_DISPLAYS_AS(expr1, expr2)` matches keyword `NOT DISPLAYS AS`
f2 := NOT_DISPLAYS_AS(NULL::BIGINT, NULL::BIGINT) -- Both NULL: not distinct
;Result
| f1 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |
NOT_DISPLAYS_AS — chained
FeatureQL
SELECT
f1 := (1).NOT_DISPLAYS_AS(2), -- Receiver is the left-hand operand
f2 := (NULL::BIGINT).NOT_DISPLAYS_AS(NULL::BIGINT) -- Same semantics as the prefix call
;Result
| f1 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |