Comparison operators
Amazon IoT SiteWise supports the following comparison operators. All comparison operations are available for built in data types and evaluate to a boolean.
Operator |
Description |
---|---|
|
Less than |
|
Greater than |
|
Less than or equal to |
|
Greater than or equal to |
|
Equals |
|
Not equal |
Type |
Type >= x |
Type <= x |
Type > x |
Type < x |
Type = x |
Type != x |
---|---|---|---|---|---|---|
|
|
|
|
|
|
|
Some predicates behave like operators but have special syntax. See below:
Operator |
Description |
---|---|
|
Tests if a value is |
|
Tests if a value is not |
NaN operators
NaN
, or 'Not a Number', is a special value in floating-point arithmetic. Here is a list of NaN
comparisions and how they work.
NaN
values must be enclosed within single quotes. For example, 'NaN
'.NaN
values are considered equal to each other.NaN
is greater than other numeric values.In aggregate functions like
AVG()
,STDDEV()
, andSUM()
, if any values areNaN
, the result isNaN
.In aggregate functions like
MAX()
andMIN()
,NaN
values are included in the calculations.
Comparison |
Result |
---|---|
|
True |
|
True if x equals NaN, False otherwise |
|
False if x equals NaN, True otherwise |
|
False |
|
True if x equals NaN, False otherwise |
|
False if x equals NaN, True otherwise |