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

Function svec_concat_replicate

methods/svec/src/pg_gp/operators.c:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58PG_FUNCTION_INFO_V1( svec_concat_replicate);
59
60Datum svec_concat_replicate(PG_FUNCTION_ARGS)
61{
62 int multiplier = PG_GETARG_INT32(0);
63 if (multiplier < 0)
64 ereport(ERROR,
65 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
66 errmsg("multiplier cannot be negative")));
67
68 SvecType *svec = PG_GETARG_SVECTYPE_P(1);
69 SparseData rep = sdata_from_svec(svec);
70 SparseData sdata = concat_replicate(rep, multiplier);
71
72 PG_RETURN_SVECTYPE_P(svec_from_sparsedata(sdata,true));
73}
74
75/**
76 * svec_concat - concatenates two svecs

Callers

nothing calls this directly

Calls 3

sdata_from_svecFunction · 0.85
concat_replicateFunction · 0.85
svec_from_sparsedataFunction · 0.85

Tested by

no test coverage detected