MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / AR_NE

Function AR_NE

src/arithmetic/boolean_funcs/boolean_funcs.c:152–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152SIValue AR_NE(SIValue *argv, int argc, void *private_data) {
153 SIValue a = argv[0];
154 SIValue b = argv[1];
155
156 int disjointOrNull = 0;
157 int res = SIValue_Compare(a, b, &disjointOrNull);
158 if(disjointOrNull == COMPARED_NULL) return SI_NullVal();
159 if(disjointOrNull == COMPARED_NAN) return SI_BoolVal(true);
160 if(disjointOrNull == DISJOINT) return SI_BoolVal(true);
161 // Disjoint comparison is allowed on EQ and NE operators, since they impose no order.
162 return SI_BoolVal(res != 0);
163}
164
165// Returns true if argv[0] is null.
166SIValue AR_IS_NULL(SIValue *argv, int argc, void *private_data) {

Callers

nothing calls this directly

Calls 3

SIValue_CompareFunction · 0.85
SI_NullValFunction · 0.85
SI_BoolValFunction · 0.85

Tested by

no test coverage detected