------------------------------------------------------------------------------ * Copy a SparseData structure including it's data and index */
| 81 | * Copy a SparseData structure including it's data and index |
| 82 | */ |
| 83 | SparseData makeSparseDataCopy(SparseData source_sdata) |
| 84 | { |
| 85 | /* Allocate the struct */ |
| 86 | SparseData sdata = (SparseData)palloc(sizeof(SparseDataStruct)); |
| 87 | /* Allocate the included elements */ |
| 88 | sdata->vals = copyStringInfo(source_sdata->vals); |
| 89 | sdata->index = copyStringInfo(source_sdata->index); |
| 90 | sdata->type_of_data = source_sdata->type_of_data; |
| 91 | sdata->unique_value_count = source_sdata->unique_value_count; |
| 92 | sdata->total_value_count = source_sdata->total_value_count; |
| 93 | return sdata; |
| 94 | } |
| 95 | /* |
| 96 | * Create a SparseData of size dimension from a constant |
| 97 | */ |
no test coverage detected