* @return A copy of an existing SparseData. */
| 1227 | * @return A copy of an existing SparseData. |
| 1228 | */ |
| 1229 | SparseData makeSparseDataCopy(SparseData source_sdata) { |
| 1230 | /* Allocate the struct */ |
| 1231 | SparseData sdata = (SparseData)palloc(sizeof(SparseDataStruct)); |
| 1232 | /* Allocate the included elements */ |
| 1233 | sdata->vals = copyStringInfo(source_sdata->vals); |
| 1234 | sdata->index = copyStringInfo(source_sdata->index); |
| 1235 | sdata->type_of_data = source_sdata->type_of_data; |
| 1236 | sdata->unique_value_count = source_sdata->unique_value_count; |
| 1237 | sdata->total_value_count = source_sdata->total_value_count; |
| 1238 | return sdata; |
| 1239 | } |
| 1240 | /** |
| 1241 | * @param constant The value of an RLE block |
| 1242 | * @param dimension The size of an RLE block |
no test coverage detected