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

Function ArrayGetOffset0

src/backend/utils/adt/arrayutils.c:50–59  ·  view source on GitHub ↗

* Same, but subscripts are assumed 0-based, and use a scale array * instead of raw dimension data (see mda_get_prod to create scale array) */

Source from the content-addressed store, hash-verified

48 * instead of raw dimension data (see mda_get_prod to create scale array)
49 */
50int
51ArrayGetOffset0(int n, const int *tup, const int *scale)
52{
53 int i,
54 lin = 0;
55
56 for (i = 0; i < n; i++)
57 lin += tup[i] * scale[i];
58 return lin;
59}
60
61/*
62 * Convert array dimensions into number of elements

Callers 1

ReadArrayStrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected