MCPcopy Create free account
hub / github.com/apache/cloudberry / makeStringInfoFromData

Function makeStringInfoFromData

gpcontrib/gp_sparse_vector/SparseData.c:151–159  ·  view source on GitHub ↗

* make a StringInfo from a data pointer and length */

Source from the content-addressed store, hash-verified

149 * make a StringInfo from a data pointer and length
150 */
151StringInfo makeStringInfoFromData(char *data,int len) {
152 StringInfo sinfo;
153 sinfo = (StringInfo)palloc(sizeof(StringInfoData));
154 sinfo->data = data;
155 sinfo->len = len;
156 sinfo->maxlen = len;
157 sinfo->cursor = 0;
158 return sinfo;
159}
160/*------------------------------------------------------------------------------
161 * Convert a double[] to a SparseData compressed format, representing duplicate
162 * values in the double[] by a count and a single value.

Callers 3

copyStringInfoFunction · 0.85
svec_concat_replicateFunction · 0.85
svec_concatFunction · 0.85

Calls 1

pallocFunction · 0.50

Tested by

no test coverage detected