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

Function makeSparseData

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

* @return A SparseData structure with allocated empty dynamic * StringInfo of unknown initial sizes. */

Source from the content-addressed store, hash-verified

1130 * StringInfo of unknown initial sizes.
1131 */
1132SparseData makeSparseData(void) {
1133 /* Allocate the struct */
1134 SparseData sdata = (SparseData)palloc(sizeof(SparseDataStruct));
1135
1136 /* Allocate the included elements */
1137 sdata->vals = makeStringInfo();
1138 sdata->index = makeStringInfo();
1139
1140 sdata->unique_value_count=0;
1141 sdata->total_value_count=0;
1142 sdata->type_of_data = FLOAT8OID;
1143 return sdata;
1144
1145 // makeStringInfo ensures vals and index each has a trailing '\0'
1146}
1147
1148/**
1149 * @return A SparseData with zero storage in its StringInfos.

Callers 7

svec_appendFunction · 0.85
op_sdata_by_sdataFunction · 0.85
arr_to_sdataFunction · 0.85
position_to_sdataFunction · 0.85
subarrFunction · 0.85
reverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected