* @return An array of integers given the (compressed) count array of a SparseData */
| 1502 | * @return An array of integers given the (compressed) count array of a SparseData |
| 1503 | */ |
| 1504 | int64 *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 |
no test coverage detected