MCPcopy Create free account
hub / github.com/apache/cloudberry / _int_overlap

Function _int_overlap

contrib/intarray/_int_op.c:98–119  ·  view source on GitHub ↗

_int_overlap -- does a overlap b? */

Source from the content-addressed store, hash-verified

96/* _int_overlap -- does a overlap b?
97 */
98Datum
99_int_overlap(PG_FUNCTION_ARGS)
100{
101 ArrayType *a = PG_GETARG_ARRAYTYPE_P_COPY(0);
102 ArrayType *b = PG_GETARG_ARRAYTYPE_P_COPY(1);
103 bool result;
104
105 CHECKARRVALID(a);
106 CHECKARRVALID(b);
107 if (ARRISEMPTY(a) || ARRISEMPTY(b))
108 return false;
109
110 SORT(a);
111 SORT(b);
112
113 result = inner_int_overlap(a, b);
114
115 pfree(a);
116 pfree(b);
117
118 PG_RETURN_BOOL(result);
119}
120
121Datum
122_int_union(PG_FUNCTION_ARGS)

Callers

nothing calls this directly

Calls 2

inner_int_overlapFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected