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

Function svec_send

gpcontrib/gp_sparse_vector/sparse_vector.c:82–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 */
81PG_FUNCTION_INFO_V1(svec_send);
82Datum
83svec_send(PG_FUNCTION_ARGS)
84{
85 StringInfoData buf;
86 SvecType *svec = PG_GETARG_SVECTYPE_P(0);
87 SparseData sdata = sdata_from_svec(svec);
88
89 pq_begintypsend(&buf);
90 pq_sendint(&buf,sdata->type_of_data,sizeof(Oid));
91 pq_sendint(&buf,sdata->unique_value_count,sizeof(int));
92 pq_sendint(&buf,sdata->total_value_count,sizeof(int));
93 pq_sendint(&buf,sdata->vals->len,sizeof(int));
94 pq_sendint(&buf,sdata->index->len,sizeof(int));
95 pq_sendbytes(&buf,sdata->vals->data,sdata->vals->len);
96 pq_sendbytes(&buf,sdata->index->data,sdata->index->len);
97
98 PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
99}
100/*
101 * svec_recv - converts external binary format to text
102 */

Callers

nothing calls this directly

Calls 5

sdata_from_svecFunction · 0.85
pq_begintypsendFunction · 0.85
pq_sendbytesFunction · 0.85
pq_endtypsendFunction · 0.85
pq_sendintFunction · 0.50

Tested by

no test coverage detected