예제 #1
0
파일: aggr.c 프로젝트: jaiminpan/Monetdb
str
AGGRquantile3(bat *retval, bat *bid, bat *gid, bat *eid, bat *quantile)
{
	// this is inlined from AGGRgrouped3 to avoid changing all the other functions for now
	BAT *b, *g, *e, *q;
	b = BATdescriptor(*bid);	/* [head,value] */
	g = BATdescriptor(*gid);	/* [head,gid] */
	e = BATdescriptor(*eid);	/* [gid,any] */
	q = BATdescriptor(*quantile);
	return AGGRgrouped(retval, NULL, b, g, e, TYPE_any, NULL, NULL, BATgroupquantile, q, 0,  "aggr.quantile");
}
예제 #2
0
파일: aggr.c 프로젝트: Clay-Birkett/monetdb
static str
AGGRgrouped3(bat *retval, bat *bid, bat *gid, bat *eid, int tp,
			 BAT *(*grpfunc)(BAT *, BAT *, BAT *, BAT *, int, int, int),
			 int skip_nils,
			 const char *malfunc)
{
	BAT *b, *g, *e;

	b = BATdescriptor(*bid);	/* [head,value] */
	g = BATdescriptor(*gid);	/* [head,gid] */
	e = BATdescriptor(*eid);	/* [gid,any] */
	return AGGRgrouped(retval, b, g, e, tp, grpfunc, skip_nils, malfunc);
}
예제 #3
0
파일: aggr.c 프로젝트: Clay-Birkett/monetdb
static str
AGGRgrouped2(bat *retval, bat *bid, bat *eid, int tp,
			 BAT *(*grpfunc)(BAT *, BAT *, BAT *, BAT *, int, int, int),
			 int skip_nils,
			 const char *malfunc)
{
	BAT *b, *g, *e;

	b = BATdescriptor(*bid);	/* [gid,value] */
	if (b == NULL)
		throw(MAL, "aggr.sum", RUNTIME_OBJECT_MISSING);
	g = BATmirror(BATmark(b, 0)); /* [dense,gid] */
	e = BATmirror(BATmark(BATmirror(b), 0)); /* [dense,value] */
	BBPreleaseref(b->batCacheid);
	b = e;
	e = BATdescriptor(*eid);	/* [gid,any] */
	return AGGRgrouped(retval, b, g, e, tp, grpfunc, skip_nils, malfunc);
}