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

Function build_aggregate_serialfn_expr

src/backend/parser/parse_agg.c:2140–2157  ·  view source on GitHub ↗

* Like build_aggregate_transfn_expr, but creates an expression tree for the * serialization function of an aggregate. */

Source from the content-addressed store, hash-verified

2138 * serialization function of an aggregate.
2139 */
2140void
2141build_aggregate_serialfn_expr(Oid serialfn_oid,
2142 Expr **serialfnexpr)
2143{
2144 List *args;
2145 FuncExpr *fexpr;
2146
2147 /* serialfn always takes INTERNAL and returns BYTEA */
2148 args = list_make1(make_agg_arg(INTERNALOID, InvalidOid));
2149
2150 fexpr = makeFuncExpr(serialfn_oid,
2151 BYTEAOID,
2152 args,
2153 InvalidOid,
2154 InvalidOid,
2155 COERCE_EXPLICIT_CALL);
2156 *serialfnexpr = (Expr *) fexpr;
2157}
2158
2159/*
2160 * Like build_aggregate_transfn_expr, but creates an expression tree for the

Callers 1

Calls 2

make_agg_argFunction · 0.85
makeFuncExprFunction · 0.85

Tested by

no test coverage detected