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

Function add_run_to_sdata

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

Adds a new block to a SparseData * The function appendBinaryStringInfo always make sure to attach a trailing '\0' * to the data array of the vals StringInfo. */

Source from the content-addressed store, hash-verified

75 * to the data array of the vals StringInfo.
76 */
77void add_run_to_sdata(char *run_val, int64 run_len, size_t width,
78 SparseData sdata)
79{
80 StringInfo index = sdata->index;
81 StringInfo vals = sdata->vals;
82
83 appendBinaryStringInfo(vals,run_val,width);
84 append_to_rle_index(index, run_len);
85 sdata->unique_value_count++;
86 sdata->total_value_count+=run_len;
87}
88
89/*------------------------------------------------------------------------------
90 * Each integer count in the RLE index is stored in a number of bytes determined

Callers 8

svec_appendFunction · 0.85
svec_pivotFunction · 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 1

append_to_rle_indexFunction · 0.85

Tested by

no test coverage detected