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

Function findoprnd

contrib/intarray/_int_bool.c:439–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439static void
440findoprnd(ITEM *ptr, int32 *pos)
441{
442 /* since this function recurses, it could be driven to stack overflow. */
443 check_stack_depth();
444
445#ifdef BS_DEBUG
446 elog(DEBUG3, (ptr[*pos].type == OPR) ?
447 "%d %c" : "%d %d", *pos, ptr[*pos].val);
448#endif
449 if (ptr[*pos].type == VAL)
450 {
451 ptr[*pos].left = 0;
452 (*pos)--;
453 }
454 else if (ptr[*pos].val == (int32) '!')
455 {
456 ptr[*pos].left = -1;
457 (*pos)--;
458 findoprnd(ptr, pos);
459 }
460 else
461 {
462 ITEM *curitem = &ptr[*pos];
463 int32 tmp = *pos;
464
465 (*pos)--;
466 findoprnd(ptr, pos);
467 curitem->left = *pos - tmp;
468 findoprnd(ptr, pos);
469 }
470}
471
472
473/*

Callers 1

bqarr_inFunction · 0.70

Calls 1

check_stack_depthFunction · 0.85

Tested by

no test coverage detected