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

Function inner_int_overlap

contrib/intarray/_int_tool.c:48–75  ·  view source on GitHub ↗

arguments are assumed sorted */

Source from the content-addressed store, hash-verified

46
47/* arguments are assumed sorted */
48bool
49inner_int_overlap(ArrayType *a, ArrayType *b)
50{
51 int na,
52 nb;
53 int i,
54 j;
55 int *da,
56 *db;
57
58 na = ARRNELEMS(a);
59 nb = ARRNELEMS(b);
60 da = ARRPTR(a);
61 db = ARRPTR(b);
62
63 i = j = 0;
64 while (i < na && j < nb)
65 {
66 if (da[i] < db[j])
67 i++;
68 else if (da[i] == db[j])
69 return true;
70 else
71 j++;
72 }
73
74 return false;
75}
76
77ArrayType *
78inner_int_union(ArrayType *a, ArrayType *b)

Callers 2

g_int_consistentFunction · 0.85
_int_overlapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected