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

Function gin_bool_consistent

contrib/intarray/_int_bool.c:335–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335bool
336gin_bool_consistent(QUERYTYPE *query, bool *check)
337{
338 GinChkVal gcv;
339 ITEM *items = GETQUERY(query);
340 int i,
341 j = 0;
342
343 if (query->size <= 0)
344 return false;
345
346 /*
347 * Set up data for checkcondition_gin. This must agree with the query
348 * extraction code in ginint4_queryextract.
349 */
350 gcv.first = items;
351 gcv.mapped_check = (bool *) palloc(sizeof(bool) * query->size);
352 for (i = 0; i < query->size; i++)
353 {
354 if (items[i].type == VAL)
355 gcv.mapped_check[i] = check[j++];
356 }
357
358 return execute(GETQUERY(query) + query->size - 1,
359 (void *) &gcv, NULL, true,
360 checkcondition_gin);
361}
362
363static bool
364contains_required_value(ITEM *curitem)

Callers 1

ginint4_consistentFunction · 0.85

Calls 2

executeFunction · 0.70
pallocFunction · 0.50

Tested by

no test coverage detected