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

Function svec_subvec

methods/svec_util/src/pg_gp/svec_util.c:277–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275Datum svec_subvec(PG_FUNCTION_ARGS);
276PG_FUNCTION_INFO_V1( svec_subvec );
277Datum svec_subvec(PG_FUNCTION_ARGS)
278{
279 if (PG_ARGISNULL(0))
280 PG_RETURN_NULL();
281
282 SvecType * sv = PG_GETARG_SVECTYPE_P(0);
283 int start = PG_GETARG_INT32(1);
284 int end = PG_GETARG_INT32(2);
285
286 SparseData in = sdata_from_svec(sv);
287 PG_RETURN_SVECTYPE_P(svec_from_sparsedata(subarr(in,start,end),true));
288}
289
290/**
291 * svec_reverse - makes a copy of the input svec, with the order of

Callers

nothing calls this directly

Calls 3

sdata_from_svecFunction · 0.85
svec_from_sparsedataFunction · 0.85
subarrFunction · 0.85

Tested by

no test coverage detected