nullCompare
Syntax
nullCompare(func, X, Y)
Arguments
func is the operator, <, >, >=, <=, or the function between, in.
X and Y can be scalars, pairs, vectors, matrices, or sets. If both X and Y are vectors or matrices, they must be of the same length or dimension.
Please note:
X and Y do not support the following data types currently: STRING, SYMBOL, IPADDR, UUID, BLOB, INT128.
Details
Return a Boolean value which is the result of “func(X,Y)”. Return NULL if the calculation involves NULL values. This function is not affected by the configuration paramter nullAsMinValueForComparison.
Examples
When nullAsMinValueForComparison=true, a NULL value is treated as the minimum value in data comparison. Function nullCompare
, however, returns NULL values, which is not affected by the configuration paramter nullAsMinValueForComparison.
$ NULL < 3
true
$ nullCompare(<, NULL, 3)
NULL
$ m1=matrix(1 2 NULL, NULL 8 4, 4 7 2 )
$ m2 = 1..9$3:3
$ m1>m2
col1 |
col2 |
col3 |
---|---|---|
false |
false |
false |
false |
true |
false |
false |
false |
false |
$ nullCompare(>,m1,m2)
col1 |
col2 |
col3 |
---|---|---|
false |
false |
|
false |
true |
false |
false |
false |
$ nullCompare(between, 4 5 NULL, 4:9)
[1,1,]