MCPcopy Create free account
hub / github.com/apache/madlib / sdata_index_to_int64arr

Function sdata_index_to_int64arr

methods/svec/src/pg_gp/SparseData.c:1504–1515  ·  view source on GitHub ↗

* @return An array of integers given the (compressed) count array of a SparseData */

Source from the content-addressed store, hash-verified

1502 * @return An array of integers given the (compressed) count array of a SparseData
1503 */
1504int64 *sdata_index_to_int64arr(SparseData sdata) {
1505 char *iptr;
1506 int64 *array_ix = (int64 *)palloc(
1507 sizeof(int64)*(sdata->unique_value_count));
1508
1509 iptr = sdata->index->data;
1510 for (int i=0; i<sdata->unique_value_count; i++,
1511 iptr+=int8compstoragesize(iptr)) {
1512 array_ix[i] = compword_to_int8(iptr);
1513 }
1514 return(array_ix);
1515}
1516
1517/**
1518 * @param target The memory area to store the serialised SparseData

Callers 1

svec_out_internalFunction · 0.85

Calls 1

compword_to_int8Function · 0.85

Tested by

no test coverage detected