Skip to main content
Version: 2.15.X

Comparison Operations

Comparison operations provide mechanisms for evaluating arguments with respect to other arguments.

The examples for each function use the following notation:

  • Square brackets ([]) indicate arrays.
  • Curly braces ({}) indicate groups.
  • Arrows (==>) separate inputs and outputs. Inputs are shown on the left side of the arrow. Outputs are shown on the right side of the arrow.
note

When arrays are used, the comparison operation applies to the array as a whole, and not to the individual elements of the array.

Normal comparison operators can only take two arrays as arguments. To compare individual array elements, use the array comparison operators.

Contains

The Contains function checks whether the entered search value is contained within the input series. If the series contains the search value, then the function returns True. Otherwise, it returns False.

Usage Information

CategoryDetails
Number of Arguments2
Mandatory Argument Names and Datatypes
  • search value: A scalar, array, or set of any datatype. The datatype must match the array subtype or set datatype of the series input.
  • series: An array or set of any datatype.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: True
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean

Examples

contains("A",["A","B","C"]) ==> True
contains("a",{"A","B","C"}) ==> False

contains("A",{["1","2","3""],["A","B","C"]}) ==> {False,True}
contains({"A","B","C"},["A","1","2"]) ==> {True,False,False}
contains(["A","B","C"],["A","2","3"]) ==> [True,False,False]
contains(["A","B","C"],{["1","2","3""],["A","B","C"]}) ==> True

contains({"1","D"},{["1","2","3""],["A","B","C"]}) ==> {True,False}

Equals

The Equals function checks whether the input variables all evaluate the same. It returns True if the input variables are all equal. Otherwise, it returns False.

Usage Information

CategoryDetails
Number of Arguments2+
Mandatory Argument Names and Datatypesarg: Any datatype.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

Equals allows more than one array as arguments. All input arrays must share the same datatype.

Examples

equals(2,3) ==> False
equals("A","A","A") ==> True
equals("A","A","B") ==> False
equals("A","A",null) ==> null

equals([2,3,4],2) ==> [True,False,False]
equals([2,3,4],[2,5,4]) ==> False

equals({5,6,7},{7,6,5}) ==> {False,True,False}
equals({2,3,4},2) ==> {True,False,False}

Greater Than

The Greater Than function checks whether the first input is greater than the second.

Usage Information

CategoryDetails
Number of Arguments2
Mandatory Argument Names and Datatypesarg: An integer, float, datetime, or string.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

Integers and floats can both be inputs of the same function.

Examples

greaterThan(2,3) ==> False
greaterThan(1,1.5) ==> False
greaterThan("B","A") ==> True

greaterThan([2,3,4],2) ==> [False,True,True]
greaterThan([1,2,3],[1,2,4]) ==> [False,False,False]
greaterThan([1,2,3],[1,2,4,5,6]) ==> [True,True,False,null,null]

greaterThan({2,3,4},2) ==> {False,True,True}
greaterThan({5,6,7},{7,6,5}) ==> {False,False,True}

Greater Than or Equals

The Greater Than or Equals function checks whether the first input is greater than or equal to the second.

Usage Information

CategoryDetails
Number of Arguments2
Mandatory Argument Names and Datatypesarg: An integer, float, datetime, or string.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

Integers and floats can both be inputs of the same function.

Examples

greaterThanOrEquals(2,3) ==> False
greaterThan(1,1.5) ==> False
greaterThanOrEquals("B","A") ==> True

greaterThanOrEquals([2,3,4],2) ==> [True,True,True]
greaterThanOrEquals([1,2,3],[1,2,4]) ==> [True,True,False]
greaterThanOrEquals([1,2,3],[1,2,4,5,6]) ==> [True,True,False,null,null]

greaterThanOrEquals({2,3,4},2) ==> {False,True,True}
greaterThanOrEquals({5,6,7},{7,6,5}) ==> {False,False,True}

Is Null

The Is Null function checks whether its input is null. If the input is null, it returns True. Otherwise, it returns False.

Usage Information

CategoryDetails
Number of Arguments1
Mandatory Argument Names and Datatypesarg: Any datatype.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean

Examples

isNull(null) ==> True
isNull([100,null,2]) ==> False
isNull({100,null,2}) ==> {False,True,False}
isNull({[1,2,3],[null,null,null]}) ==> {False,False}

Less Than

The Less Than function checks whether the first input is less than the second.

Usage Information

CategoryDetails
Number of Arguments2
Mandatory Argument Names and Datatypesarg: An integer, float, datetime, or string.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

Integers and floats can both be inputs of the same function.

Examples

lessThan(1,1.5) ==> True
lessThan(2,3) ==> True
lessThan("B","A") ==> False

lessThan([2,3,4],2) ==> [False,False,False]
lessThan([1,2,3],[1,2,4]) ==> [False,False,False]
lessThan([1,2,3],[1,2,4,5,6]) ==> [False,False,True,null,null]

lessThan({2,3,4},2) ==> {False,False,False}
lessThan({5,6,7},{7,6,5}) ==> {True,False,False}

Less Than or Equals

The Less Than or Equals function checks whether the first input is less than or equal to the second.

Usage Information

CategoryDetails
Number of Arguments2
Mandatory Argument Names and Datatypesarg: An integer, float, datetime, or string.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

Integers and floats can both be inputs of the same function.

Examples

lessThanOrEquals(1,1.5) ==> True
lessThanOrEquals(2,3) ==> True
lessThanOrEquals("B","A") ==> False

lessThanOrEquals([2,3,4],2) ==> [True,False,False]
lessThanOrEquals([1,2,3],[1,2,4]) ==> [True,True,False]
lessThanOrEquals([1,2,3],[1,2,4,5,6]) ==> [True,True,True,null,null]

lessThanOrEquals({2,3,4},2) ==> {True,False,False}
lessThanOrEquals({5,6,7},{7,6,5}) ==> {True,True,False}

Not Equal

The Not Equal functions checks whether the input arguments are identical. If the inputs are not identical, then it returns True. Otherwise, it returns False.

Usage Information

CategoryDetails
Number of Arguments2+
Mandatory Argument Names and Datatypesarg: Any datatype.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean
note

All input arguments must be of the same datatype.

Not Equal allows more than one array as arguments. All input arrays must share the same datatype.

Examples

notEquals(2,3) ==> True
notEquals("A","A","A") ==> False
notEquals("A","A","B") ==> True
notEquals("A","A",null) ==> null

notEquals([2,3,4],2) ==> [True,False,False]
notEquals([2,3,4],[2,5,4]) ==> True

notEquals({5,6,7},{7,6,5}) ==> {True,False,True}
notEquals({2,3,4},2) ==> {False,True,True}

Not Null

The Not Null function checks whether the input is a non-null value. If the input is not null, the function returns True. Otherwise, it returns False.

Usage Information

CategoryDetails
Number of Arguments1
Mandatory Argument Names and Datatypesarg: Any datatype.
  • Scalar Support: True
  • Array Support: True
  • Group of Scalars Support: True
  • Group of Arrays Support: False
Optional Argument Names and DatatypesN/A
ModifiersN/A
Output Datatype(s)Boolean

Examples

isNotNull(null) ==> False
isNotNull([100,null,2]) ==> True
isNotNull({100,null,2}) ==> {True,False,True}
isNotNull({[1,2,3],[null,null,null]}) ==> {True,True}