LCOV - code coverage report
Current view: top level - monetdb5/modules/kernel - aggr.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 249 510 48.8 %
Date: 2021-10-13 02:24:04 Functions: 36 114 31.6 %

          Line data    Source code
       1             : /*
       2             :  * This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0.  If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       5             :  *
       6             :  * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V.
       7             :  */
       8             : 
       9             : #include "monetdb_config.h"
      10             : #include "mal.h"
      11             : #include "mal_exception.h"
      12             : 
      13             : /*
      14             :  * grouped aggregates
      15             :  */
      16             : static str
      17       22386 : AGGRgrouped(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, const bat *sid,
      18             :                         bool skip_nils, bool abort_on_error, int scale, int tp,
      19             :                         BAT *(*grpfunc1)(BAT *, BAT *, BAT *, BAT *, int, bool, bool),
      20             :                         gdk_return (*grpfunc2)(BAT **, BAT **, BAT *, BAT *, BAT *, BAT *, int, bool, bool, int),
      21             :                         BAT *(*quantilefunc)(BAT *, BAT *, BAT *, BAT *, int, double, bool, bool),
      22             :                         const bat *quantile,
      23             :                         const char *malfunc)
      24             : {
      25       22386 :         BAT *b, *g, *e, *s, *bn = NULL, *cnts, *q = NULL;
      26             :         double qvalue;
      27             : 
      28             :         /* exactly one of grpfunc1, grpfunc2 and quantilefunc is non-NULL */
      29       22386 :         assert((grpfunc1 != NULL) + (grpfunc2 != NULL) + (quantilefunc != NULL) == 1);
      30             : 
      31             :         /* if retval2 is non-NULL, we must have grpfunc2 */
      32       22386 :         assert(retval2 == NULL || grpfunc2 != NULL);
      33             :         /* only quantiles need a quantile BAT */
      34       22386 :         assert((quantilefunc == NULL) == (quantile == NULL));
      35             : 
      36       22386 :         b = BATdescriptor(*bid);
      37       22387 :         g = gid ? BATdescriptor(*gid) : NULL;
      38       22386 :         e = eid ? BATdescriptor(*eid) : NULL;
      39       22387 :         s = sid ? BATdescriptor(*sid) : NULL;
      40       22385 :         q = quantile ? BATdescriptor(*quantile) : NULL;
      41             : 
      42       22386 :         if (b == NULL ||
      43       22386 :                 (gid != NULL && g == NULL) ||
      44       22386 :                 (eid != NULL && e == NULL) ||
      45       22386 :                 (sid != NULL && s == NULL) ||
      46       22386 :                 (quantile != NULL && q == NULL)) {
      47           0 :                 if (b)
      48           0 :                         BBPunfix(b->batCacheid);
      49           0 :                 if (g)
      50           0 :                         BBPunfix(g->batCacheid);
      51           0 :                 if (e)
      52           0 :                         BBPunfix(e->batCacheid);
      53           0 :                 if (s)
      54           0 :                         BBPunfix(s->batCacheid);
      55           0 :                 if (q)
      56           0 :                         BBPunfix(q->batCacheid);
      57           0 :                 throw(MAL, malfunc, SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
      58             :         }
      59       22386 :         if (tp == TYPE_any &&
      60          43 :                 (grpfunc1 == BATgroupmedian ||
      61          40 :                  grpfunc1 == BATgroupmedian_avg ||
      62           3 :                  quantilefunc == BATgroupquantile ||
      63             :                  quantilefunc == BATgroupquantile_avg))
      64          71 :                 tp = b->ttype;
      65             : 
      66       22386 :         if (grpfunc1) {
      67       22096 :                 bn = (*grpfunc1)(b, g, e, s, tp, skip_nils, abort_on_error);
      68         290 :         } else if (quantilefunc) {
      69          40 :                 assert(BATcount(q) > 0 || BATcount(b) == 0);
      70          40 :                 assert(q->ttype == TYPE_dbl);
      71          40 :                 if (BATcount(q) == 0) {
      72             :                         qvalue = 0.5;
      73             :                 } else {
      74          33 :                         MT_lock_set(&q->theaplock);
      75          33 :                         qvalue = ((const dbl *)Tloc(q, 0))[0];
      76          33 :                         MT_lock_unset(&q->theaplock);
      77          33 :                         if (qvalue < 0 || qvalue > 1) {
      78           8 :                                 BBPunfix(b->batCacheid);
      79           8 :                                 if (g)
      80           4 :                                         BBPunfix(g->batCacheid);
      81           8 :                                 if (e)
      82           4 :                                         BBPunfix(e->batCacheid);
      83           8 :                                 if (s)
      84           0 :                                         BBPunfix(s->batCacheid);
      85           8 :                                 BBPunfix(q->batCacheid);
      86           8 :                                 throw(MAL, malfunc,
      87             :                                           "quantile value of %f is not in range [0,1]", qvalue);
      88             :                         }
      89             :                 }
      90          32 :                 BBPunfix(q->batCacheid);
      91          32 :                 bn = (*quantilefunc)(b, g, e, s, tp, qvalue, skip_nils, abort_on_error);
      92         391 :         } else if ((*grpfunc2)(&bn, retval2 ? &cnts : NULL, b, g, e, s, tp,
      93             :                                                    skip_nils, abort_on_error, scale) != GDK_SUCCEED) {
      94           0 :                 bn = NULL;
      95             :         }
      96             : 
      97       22378 :         BBPunfix(b->batCacheid);
      98       22378 :         if (g)
      99       22335 :                 BBPunfix(g->batCacheid);
     100       22377 :         if (e)
     101       22334 :                 BBPunfix(e->batCacheid);
     102       22379 :         if (s)
     103           0 :                 BBPunfix(s->batCacheid);
     104       22379 :         if (bn == NULL)
     105           2 :                 throw(MAL, malfunc, GDK_EXCEPTION);
     106       22377 :         *retval1 = bn->batCacheid;
     107       22377 :         BBPkeepref(bn->batCacheid);
     108       22375 :         if (retval2) {
     109         109 :                 *retval2 = cnts->batCacheid;
     110         109 :                 BBPkeepref(cnts->batCacheid);
     111             :         }
     112             :         return MAL_SUCCEED;
     113             : }
     114             : 
     115             : static str
     116           0 : AGGRsum3_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     117             : {
     118           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_bte,
     119             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     120             : }
     121             : 
     122             : static str
     123           0 : AGGRsum3_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     124             : {
     125           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_sht,
     126             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     127             : }
     128             : 
     129             : static str
     130           0 : AGGRsum3_int(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     131             : {
     132           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_int,
     133             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     134             : }
     135             : 
     136             : static str
     137           0 : AGGRsum3_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     138             : {
     139           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_lng,
     140             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     141             : }
     142             : 
     143             : #ifdef HAVE_HGE
     144             : static str
     145           0 : AGGRsum3_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     146             : {
     147           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_hge,
     148             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     149             : }
     150             : #endif
     151             : 
     152             : static str
     153           0 : AGGRsum3_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     154             : {
     155           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_flt,
     156             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     157             : }
     158             : 
     159             : static str
     160           0 : AGGRsum3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     161             : {
     162           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     163             :                                            BATgroupsum, NULL, NULL, NULL, "aggr.sum");
     164             : }
     165             : 
     166             : static str
     167           0 : AGGRprod3_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     168             : {
     169           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_bte,
     170             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     171             : }
     172             : 
     173             : static str
     174           0 : AGGRprod3_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     175             : {
     176           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_sht,
     177             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     178             : }
     179             : 
     180             : static str
     181           0 : AGGRprod3_int(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     182             : {
     183           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_int,
     184             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     185             : }
     186             : 
     187             : static str
     188           0 : AGGRprod3_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     189             : {
     190           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_lng,
     191             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     192             : }
     193             : 
     194             : #ifdef HAVE_HGE
     195             : static str
     196           0 : AGGRprod3_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     197             : {
     198           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_hge,
     199             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     200             : }
     201             : #endif
     202             : 
     203             : static str
     204           0 : AGGRprod3_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     205             : {
     206           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_flt,
     207             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     208             : }
     209             : 
     210             : static str
     211           0 : AGGRprod3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     212             : {
     213           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     214             :                                            BATgroupprod, NULL, NULL, NULL, "aggr.prod");
     215             : }
     216             : 
     217             : static str
     218           0 : AGGRavg13_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     219             : {
     220           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     221             :                                            NULL, BATgroupavg, NULL, NULL, "aggr.avg");
     222             : }
     223             : 
     224             : static str
     225           0 : AGGRavg23_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid)
     226             : {
     227           0 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     228             :                                            NULL, BATgroupavg, NULL, NULL, "aggr.avg");
     229             : }
     230             : 
     231             : static str
     232           0 : AGGRavg14_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, int *scale)
     233             : {
     234           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, *scale, TYPE_dbl,
     235             :                                            NULL, BATgroupavg, NULL, NULL, "aggr.avg");
     236             : }
     237             : 
     238             : static str
     239           0 : AGGRavg24_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, int *scale)
     240             : {
     241           0 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, NULL, 1, 1, *scale, TYPE_dbl,
     242             :                                            NULL, BATgroupavg, NULL, NULL, "aggr.avg");
     243             : }
     244             : 
     245             : static str
     246           0 : AGGRstdev3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     247             : {
     248           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     249             :                                            BATgroupstdev_sample, NULL, NULL, NULL, "aggr.stdev");
     250             : }
     251             : 
     252             : static str
     253           0 : AGGRstdevp3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     254             : {
     255           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     256             :                                            BATgroupstdev_population, NULL, NULL, NULL, "aggr.stdevp");
     257             : }
     258             : 
     259             : static str
     260           0 : AGGRvariance3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     261             : {
     262           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     263             :                                            BATgroupvariance_sample, NULL, NULL, NULL, "aggr.variance");
     264             : }
     265             : 
     266             : static str
     267           0 : AGGRvariancep3_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     268             : {
     269           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_dbl,
     270             :                                            BATgroupvariance_population, NULL, NULL, NULL, "aggr.variancep");
     271             : }
     272             : 
     273             : static str
     274           0 : AGGRcount3(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *ignorenils)
     275             : {
     276           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *ignorenils, 1, 0, TYPE_lng,
     277             :                                            BATgroupcount, NULL, NULL, NULL, "aggr.count");
     278             : }
     279             : 
     280             : static str
     281           0 : AGGRcount3nonils(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     282             : {
     283           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 1, 1, 0, TYPE_lng,
     284             :                                            BATgroupcount, NULL, NULL, NULL, "aggr.count");
     285             : }
     286             : 
     287             : static str
     288           0 : AGGRcount3nils(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     289             : {
     290           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, 0, 1, 0, TYPE_lng,
     291             :                                            BATgroupcount, NULL, NULL, NULL, "aggr.count");
     292             : }
     293             : 
     294             : #include "algebra.h"                  /* for ALGprojection */
     295             : static str
     296           1 : AGGRmin3(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     297             : {
     298             :         bat tmpid;
     299             :         str err;
     300             : 
     301           1 :         err = AGGRgrouped(&tmpid, NULL, bid, gid, eid, NULL, 0, 1, 0, TYPE_oid,
     302             :                                           BATgroupmin, NULL, NULL, NULL, "aggr.min");
     303           1 :         if (err == MAL_SUCCEED) {
     304           1 :                 err = ALGprojection(retval, &tmpid, bid);
     305           1 :                 BBPrelease(tmpid);
     306             :         }
     307           1 :         return err;
     308             : }
     309             : 
     310             : static str
     311           1 : AGGRmax3(bat *retval, const bat *bid, const bat *gid, const bat *eid)
     312             : {
     313             :         bat tmpid;
     314             :         str err;
     315             : 
     316           1 :         err = AGGRgrouped(&tmpid, NULL, bid, gid, eid, NULL, 0, 1, 0, TYPE_oid,
     317             :                                           BATgroupmax, NULL, NULL, NULL, "aggr.max");
     318           1 :         if (err == MAL_SUCCEED) {
     319           1 :                 err = ALGprojection(retval, &tmpid, bid);
     320           1 :                 BBPrelease(tmpid);
     321             :         }
     322           1 :         return err;
     323             : }
     324             : 
     325             : static str
     326           0 : AGGRsubsum_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     327             : {
     328           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     329           0 :                                            *abort_on_error, 0, TYPE_bte, BATgroupsum, NULL,
     330             :                                            NULL, NULL, "aggr.subsum");
     331             : }
     332             : 
     333             : static str
     334           0 : AGGRsubsum_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     335             : {
     336           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     337           0 :                                            *abort_on_error, 0, TYPE_sht, BATgroupsum, NULL,
     338             :                                            NULL, NULL, "aggr.subsum");
     339             : }
     340             : 
     341             : static str
     342           0 : AGGRsubsum_int(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     343             : {
     344           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     345           0 :                                            *abort_on_error, 0, TYPE_int, BATgroupsum, NULL,
     346             :                                            NULL, NULL, "aggr.subsum");
     347             : }
     348             : 
     349             : static str
     350        3817 : AGGRsubsum_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     351             : {
     352        7634 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     353        3817 :                                            *abort_on_error, 0, TYPE_lng, BATgroupsum, NULL,
     354             :                                            NULL, NULL, "aggr.subsum");
     355             : }
     356             : 
     357             : #ifdef HAVE_HGE
     358             : static str
     359        3915 : AGGRsubsum_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid, bit *skip_nils, bit *abort_on_error)
     360             : {
     361        7828 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     362        3915 :                                            *abort_on_error, 0, TYPE_hge, BATgroupsum, NULL,
     363             :                                            NULL, NULL, "aggr.subsum");
     364             : }
     365             : #endif
     366             : 
     367             : static str
     368           0 : AGGRsubsum_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     369             : {
     370           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     371           0 :                                            *abort_on_error, 0, TYPE_flt, BATgroupsum, NULL,
     372             :                                            NULL, NULL, "aggr.subsum");
     373             : }
     374             : 
     375             : static str
     376          44 : AGGRsubsum_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     377             : {
     378          88 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     379          44 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupsum, NULL,
     380             :                                            NULL, NULL, "aggr.subsum");
     381             : }
     382             : 
     383             : static str
     384           0 : AGGRsubsumcand_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     385             : {
     386           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     387           0 :                                            *abort_on_error, 0, TYPE_bte, BATgroupsum, NULL,
     388             :                                            NULL, NULL, "aggr.subsum");
     389             : }
     390             : 
     391             : static str
     392           0 : AGGRsubsumcand_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     393             : {
     394           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     395           0 :                                            *abort_on_error, 0, TYPE_sht, BATgroupsum, NULL,
     396             :                                            NULL, NULL, "aggr.subsum");
     397             : }
     398             : 
     399             : static str
     400           0 : AGGRsubsumcand_int(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     401             : {
     402           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     403           0 :                                            *abort_on_error, 0, TYPE_int, BATgroupsum, NULL,
     404             :                                            NULL, NULL, "aggr.subsum");
     405             : }
     406             : 
     407             : static str
     408           0 : AGGRsubsumcand_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     409             : {
     410           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     411           0 :                                            *abort_on_error, 0, TYPE_lng, BATgroupsum, NULL,
     412             :                                            NULL, NULL, "aggr.subsum");
     413             : }
     414             : 
     415             : #ifdef HAVE_HGE
     416             : static str
     417           0 : AGGRsubsumcand_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     418             : {
     419           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     420           0 :                                            *abort_on_error, 0, TYPE_hge, BATgroupsum, NULL,
     421             :                                            NULL, NULL, "aggr.subsum");
     422             : }
     423             : #endif
     424             : 
     425             : static str
     426           0 : AGGRsubsumcand_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     427             : {
     428           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     429           0 :                                            *abort_on_error, 0, TYPE_flt, BATgroupsum, NULL,
     430             :                                            NULL, NULL, "aggr.subsum");
     431             : }
     432             : 
     433             : static str
     434           0 : AGGRsubsumcand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     435             : {
     436           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     437           0 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupsum, NULL,
     438             :                                            NULL, NULL, "aggr.subsum");
     439             : }
     440             : 
     441             : static str
     442           0 : AGGRsubprod_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     443             : {
     444           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     445           0 :                                            *abort_on_error, 0, TYPE_bte, BATgroupprod, NULL,
     446             :                                            NULL, NULL, "aggr.subprod");
     447             : }
     448             : 
     449             : static str
     450           0 : AGGRsubprod_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     451             : {
     452           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     453           0 :                                            *abort_on_error, 0, TYPE_sht, BATgroupprod, NULL,
     454             :                                            NULL, NULL, "aggr.subprod");
     455             : }
     456             : 
     457             : static str
     458           0 : AGGRsubprod_int(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     459             : {
     460           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     461           0 :                                            *abort_on_error, 0, TYPE_int, BATgroupprod, NULL,
     462             :                                            NULL, NULL, "aggr.subprod");
     463             : }
     464             : 
     465             : static str
     466           0 : AGGRsubprod_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     467             : {
     468           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     469           0 :                                            *abort_on_error, 0, TYPE_lng, BATgroupprod, NULL,
     470             :                                            NULL, NULL, "aggr.subprod");
     471             : }
     472             : 
     473             : #ifdef HAVE_HGE
     474             : static str
     475           0 : AGGRsubprod_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     476             : {
     477           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     478           0 :                                            *abort_on_error, 0, TYPE_hge, BATgroupprod, NULL,
     479             :                                            NULL, NULL, "aggr.subprod");
     480             : }
     481             : #endif
     482             : 
     483             : static str
     484           0 : AGGRsubprod_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     485             : {
     486           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     487           0 :                                            *abort_on_error, 0, TYPE_flt, BATgroupprod, NULL,
     488             :                                            NULL, NULL, "aggr.subprod");
     489             : }
     490             : 
     491             : static str
     492          17 : AGGRsubprod_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     493             : {
     494          34 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     495          17 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupprod, NULL,
     496             :                                            NULL, NULL, "aggr.subprod");
     497             : }
     498             : 
     499             : static str
     500           0 : AGGRsubprodcand_bte(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     501             : {
     502           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     503           0 :                                            *abort_on_error, 0, TYPE_bte, BATgroupprod, NULL,
     504             :                                            NULL, NULL, "aggr.subprod");
     505             : }
     506             : 
     507             : static str
     508           0 : AGGRsubprodcand_sht(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     509             : {
     510           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     511           0 :                                            *abort_on_error, 0, TYPE_sht, BATgroupprod, NULL,
     512             :                                            NULL, NULL, "aggr.subprod");
     513             : }
     514             : 
     515             : static str
     516           0 : AGGRsubprodcand_int(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     517             : {
     518           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     519           0 :                                            *abort_on_error, 0, TYPE_int, BATgroupprod, NULL,
     520             :                                            NULL, NULL, "aggr.subprod");
     521             : }
     522             : 
     523             : static str
     524           0 : AGGRsubprodcand_lng(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     525             : {
     526           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     527           0 :                                            *abort_on_error, 0, TYPE_lng, BATgroupprod, NULL,
     528             :                                            NULL, NULL, "aggr.subprod");
     529             : }
     530             : 
     531             : #ifdef HAVE_HGE
     532             : static str
     533           0 : AGGRsubprodcand_hge(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     534             : {
     535           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     536           0 :                                            *abort_on_error, 0, TYPE_hge, BATgroupprod, NULL,
     537             :                                            NULL, NULL, "aggr.subprod");
     538             : }
     539             : #endif
     540             : 
     541             : static str
     542           0 : AGGRsubprodcand_flt(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     543             : {
     544           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     545           0 :                                            *abort_on_error, 0, TYPE_flt, BATgroupprod, NULL,
     546             :                                            NULL, NULL, "aggr.subprod");
     547             : }
     548             : 
     549             : static str
     550           0 : AGGRsubprodcand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     551             : {
     552           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     553           0 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupprod, NULL,
     554             :                                            NULL, NULL, "aggr.subprod");
     555             : }
     556             : 
     557             : static str
     558         141 : AGGRsubavg1_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     559             : {
     560         282 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     561         141 :                                            *abort_on_error, 0, TYPE_dbl, NULL, BATgroupavg,
     562             :                                            NULL, NULL, "aggr.subavg");
     563             : }
     564             : 
     565             : static str
     566           0 : AGGRsubavg1cand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     567             : {
     568           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     569           0 :                                            *abort_on_error, 0, TYPE_dbl, NULL, BATgroupavg,
     570             :                                            NULL, NULL, "aggr.subavg");
     571             : }
     572             : 
     573             : static str
     574         109 : AGGRsubavg2_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     575             : {
     576         218 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, NULL, *skip_nils,
     577         109 :                                            *abort_on_error, 0, TYPE_dbl, NULL, BATgroupavg,
     578             :                                            NULL, NULL, "aggr.subavg");
     579             : }
     580             : 
     581             : static str
     582           0 : AGGRsubavg2cand_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     583             : {
     584           0 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, sid, *skip_nils,
     585           0 :                                            *abort_on_error, 0, TYPE_dbl, NULL, BATgroupavg,
     586             :                                            NULL, NULL, "aggr.subavg");
     587             : }
     588             : 
     589             : static str
     590           0 : AGGRsubavg1s_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error, int *scale)
     591             : {
     592           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     593           0 :                                            *abort_on_error, *scale, TYPE_dbl, NULL, BATgroupavg,
     594             :                                            NULL, NULL, "aggr.subavg");
     595             : }
     596             : 
     597             : static str
     598           0 : AGGRsubavg1scand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error, int *scale)
     599             : {
     600           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     601           0 :                                            *abort_on_error, *scale, TYPE_dbl, NULL, BATgroupavg,
     602             :                                            NULL, NULL, "aggr.subavg");
     603             : }
     604             : 
     605             : static str
     606           0 : AGGRsubavg2s_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error, int *scale)
     607             : {
     608           0 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, NULL, *skip_nils,
     609           0 :                                            *abort_on_error, *scale, TYPE_dbl, NULL, BATgroupavg,
     610             :                                            NULL, NULL, "aggr.subavg");
     611             : }
     612             : 
     613             : static str
     614           0 : AGGRsubavg2scand_dbl(bat *retval1, bat *retval2, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error, int *scale)
     615             : {
     616           0 :         return AGGRgrouped(retval1, retval2, bid, gid, eid, sid, *skip_nils,
     617           0 :                                            *abort_on_error, *scale, TYPE_dbl, NULL, BATgroupavg,
     618             :                                            NULL, NULL, "aggr.subavg");
     619             : }
     620             : 
     621             : static str
     622         352 : AGGRavg3(bat *retval1, bat *retval2, bat *retval3, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     623             : {
     624             :         BAT *b, *g, *e, *s, *avgs, *cnts, *rems;
     625             :         gdk_return rc;
     626             : 
     627         352 :         b = BATdescriptor(*bid);
     628         352 :         g = gid != NULL && !is_bat_nil(*gid) ? BATdescriptor(*gid) : NULL;
     629         352 :         e = eid != NULL && !is_bat_nil(*eid) ? BATdescriptor(*eid) : NULL;
     630         352 :         s = sid != NULL && !is_bat_nil(*sid) ? BATdescriptor(*sid) : NULL;
     631             : 
     632         352 :         if (b == NULL ||
     633         352 :                 (gid != NULL && !is_bat_nil(*gid) && g == NULL) ||
     634         352 :                 (eid != NULL && !is_bat_nil(*eid) && e == NULL) ||
     635         352 :                 (sid != NULL && !is_bat_nil(*sid) && s == NULL)) {
     636           0 :                 if (b)
     637           0 :                         BBPunfix(b->batCacheid);
     638           0 :                 if (g)
     639           0 :                         BBPunfix(g->batCacheid);
     640           0 :                 if (e)
     641           0 :                         BBPunfix(e->batCacheid);
     642           0 :                 if (s)
     643           0 :                         BBPunfix(s->batCacheid);
     644           0 :                 throw(MAL, "aggr.subavg", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
     645             :         }
     646             : 
     647         352 :         rc = BATgroupavg3(&avgs, &rems, &cnts, b, g, e, s, *skip_nils);
     648             : 
     649         352 :         BBPunfix(b->batCacheid);
     650         352 :         if (g)
     651         352 :                 BBPunfix(g->batCacheid);
     652         352 :         if (e)
     653         352 :                 BBPunfix(e->batCacheid);
     654         352 :         if (s)
     655           0 :                 BBPunfix(s->batCacheid);
     656         352 :         if (rc != GDK_SUCCEED)
     657           0 :                 throw(MAL, "aggr.subavg", GDK_EXCEPTION);
     658         352 :         *retval1 = avgs->batCacheid;
     659         352 :         BBPkeepref(avgs->batCacheid);
     660         352 :         *retval2 = rems->batCacheid;
     661         352 :         BBPkeepref(rems->batCacheid);
     662         352 :         *retval3 = cnts->batCacheid;
     663         352 :         BBPkeepref(cnts->batCacheid);
     664         352 :         return MAL_SUCCEED;
     665             : }
     666             : 
     667             : static str
     668          19 : AGGRavg3comb(bat *retval1, const bat *bid, const bat *rid, const bat *cid, const bat *gid, const bat *eid, const bit *skip_nils)
     669             : {
     670             :         BAT *b, *r, *c, *g, *e, *bn;
     671             : 
     672          19 :         b = BATdescriptor(*bid);
     673          19 :         r = BATdescriptor(*rid);
     674          19 :         c = BATdescriptor(*cid);
     675          19 :         g = gid != NULL && !is_bat_nil(*gid) ? BATdescriptor(*gid) : NULL;
     676          19 :         e = eid != NULL && !is_bat_nil(*eid) ? BATdescriptor(*eid) : NULL;
     677             : 
     678          19 :         if (b == NULL ||
     679          19 :                 r == NULL ||
     680          19 :                 c == NULL ||
     681          19 :                 (gid != NULL && !is_bat_nil(*gid) && g == NULL) ||
     682          19 :                 (eid != NULL && !is_bat_nil(*eid) && e == NULL)) {
     683           0 :                 if (b)
     684           0 :                         BBPunfix(b->batCacheid);
     685           0 :                 if (r)
     686           0 :                         BBPunfix(r->batCacheid);
     687           0 :                 if (c)
     688           0 :                         BBPunfix(c->batCacheid);
     689           0 :                 if (g)
     690           0 :                         BBPunfix(g->batCacheid);
     691           0 :                 if (e)
     692           0 :                         BBPunfix(e->batCacheid);
     693           0 :                 throw(MAL, "aggr.subavg", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
     694             :         }
     695             : 
     696          19 :         bn = BATgroupavg3combine(b, r, c, g, e, *skip_nils);
     697             : 
     698          19 :         BBPunfix(b->batCacheid);
     699          19 :         BBPunfix(r->batCacheid);
     700          19 :         BBPunfix(c->batCacheid);
     701          19 :         if (g)
     702          19 :                 BBPunfix(g->batCacheid);
     703          19 :         if (e)
     704          19 :                 BBPunfix(e->batCacheid);
     705          19 :         if (bn == NULL)
     706           0 :                 throw(MAL, "aggr.subavg", GDK_EXCEPTION);
     707          19 :         *retval1 = bn->batCacheid;
     708          19 :         BBPkeepref(bn->batCacheid);
     709          19 :         return MAL_SUCCEED;
     710             : }
     711             : 
     712             : static str
     713           7 : AGGRsubstdev_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     714             : {
     715          14 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     716           7 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupstdev_sample,
     717             :                                            NULL, NULL, NULL, "aggr.substdev");
     718             : }
     719             : 
     720             : static str
     721           0 : AGGRsubstdevcand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     722             : {
     723           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     724           0 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupstdev_sample,
     725             :                                            NULL, NULL, NULL, "aggr.substdev");
     726             : }
     727             : 
     728             : static str
     729           5 : AGGRsubstdevp_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     730             : {
     731          10 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     732           5 :                                            *abort_on_error, 0, TYPE_dbl,
     733             :                                            BATgroupstdev_population, NULL, NULL, NULL,
     734             :                                            "aggr.substdevp");
     735             : }
     736             : 
     737             : static str
     738           0 : AGGRsubstdevpcand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     739             : {
     740           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     741           0 :                                            *abort_on_error, 0, TYPE_dbl,
     742             :                                            BATgroupstdev_population,
     743             :                                            NULL, NULL, NULL, "aggr.substdevp");
     744             : }
     745             : 
     746             : static str
     747           1 : AGGRsubvariance_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     748             : {
     749           2 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     750           1 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupvariance_sample,
     751             :                                            NULL, NULL, NULL, "aggr.subvariance");
     752             : }
     753             : 
     754             : static str
     755           0 : AGGRsubvariancecand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     756             : {
     757           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     758           0 :                                            *abort_on_error, 0, TYPE_dbl, BATgroupvariance_sample,
     759             :                                            NULL, NULL, NULL, "aggr.subvariance");
     760             : }
     761             : 
     762             : static str
     763           5 : AGGRsubvariancep_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
     764             : {
     765          10 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     766           5 :                                            *abort_on_error, 0, TYPE_dbl,
     767             :                                            BATgroupvariance_population, NULL,
     768             :                                            NULL, NULL, "aggr.subvariancep");
     769             : }
     770             : 
     771             : static str
     772           0 : AGGRsubvariancepcand_dbl(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
     773             : {
     774           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     775           0 :                                            *abort_on_error, 0, TYPE_dbl,
     776             :                                            BATgroupvariance_population, NULL,
     777             :                                            NULL, NULL, "aggr.subvariancep");
     778             : }
     779             : 
     780             : static str
     781       13404 : AGGRsubcount(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     782             : {
     783       13404 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     784             :                                            0, 0, TYPE_lng, BATgroupcount, NULL, NULL,
     785             :                                            NULL, "aggr.subcount");
     786             : }
     787             : 
     788             : static str
     789           0 : AGGRsubcountcand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     790             : {
     791           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     792             :                                            0, 0, TYPE_lng, BATgroupcount, NULL,
     793             :                                            NULL, NULL, "aggr.subcount");
     794             : }
     795             : 
     796             : static str
     797           0 : AGGRsubmin(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     798             : {
     799           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     800             :                                            0, 0, TYPE_oid, BATgroupmin, NULL,
     801             :                                            NULL, NULL, "aggr.submin");
     802             : }
     803             : 
     804             : static str
     805           0 : AGGRsubmincand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     806             : {
     807           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     808             :                                            0, 0, TYPE_oid, BATgroupmin, NULL,
     809             :                                            NULL, NULL, "aggr.submin");
     810             : }
     811             : 
     812             : static str
     813           0 : AGGRsubmax(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     814             : {
     815           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     816             :                                            0, 0, TYPE_oid, BATgroupmax, NULL,
     817             :                                            NULL, NULL, "aggr.submax");
     818             : }
     819             : 
     820             : static str
     821           0 : AGGRsubmaxcand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     822             : {
     823           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     824             :                                            0, 0, TYPE_oid, BATgroupmax, NULL,
     825             :                                            NULL, NULL, "aggr.submax");
     826             : }
     827             : 
     828             : static str
     829         391 : AGGRsubmincand_val(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     830             : {
     831             :         bat tmpid;
     832             :         str err;
     833             : 
     834         391 :         err = AGGRgrouped(&tmpid, NULL, bid, gid, eid, sid, *skip_nils, 0,
     835             :                                           0, TYPE_oid, BATgroupmin, NULL, NULL, NULL, "aggr.submin");
     836         391 :         if (err == MAL_SUCCEED) {
     837         391 :                 err = ALGprojection(retval, &tmpid, bid);
     838         391 :                 BBPrelease(tmpid);
     839             :         }
     840         391 :         return err;
     841             : }
     842             : 
     843             : static str
     844         391 : AGGRsubmin_val(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     845             : {
     846         391 :         return AGGRsubmincand_val(retval, bid, gid, eid, NULL, skip_nils);
     847             : }
     848             : 
     849             : static str
     850         458 : AGGRsubmaxcand_val(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     851             : {
     852             :         bat tmpid;
     853             :         str err;
     854             : 
     855         458 :         err = AGGRgrouped(&tmpid, NULL, bid, gid, eid, sid, *skip_nils, 0,
     856             :                                           0, TYPE_oid, BATgroupmax, NULL, NULL, NULL, "aggr.submax");
     857         458 :         if (err == MAL_SUCCEED) {
     858         458 :                 err = ALGprojection(retval, &tmpid, bid);
     859         458 :                 BBPrelease(tmpid);
     860             :         }
     861         458 :         return err;
     862             : }
     863             : 
     864             : static str
     865         458 : AGGRsubmax_val(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     866             : {
     867         458 :         return AGGRsubmaxcand_val(retval, bid, gid, eid, NULL, skip_nils);
     868             : }
     869             : 
     870             : static str
     871          19 : AGGRmedian(void *retval, const bat *bid)
     872             : {
     873             :         str err;
     874             :         bat rval;
     875          19 :         if ((err = AGGRgrouped(&rval, NULL, bid, NULL, NULL, NULL, 1,
     876             :                                                    0, 0, TYPE_any, BATgroupmedian, NULL,
     877             :                                                    NULL, NULL, "aggr.submedian")) == MAL_SUCCEED) {
     878          19 :                 oid pos = 0;
     879          19 :                 err = ALGfetchoid(retval, &rval, &pos);
     880          19 :                 BBPrelease(rval);
     881             :         }
     882          19 :         return err;
     883             : }
     884             : 
     885             : static str
     886           9 : AGGRsubmedian(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     887             : {
     888           9 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     889             :                                            0, 0, TYPE_any, BATgroupmedian, NULL,
     890             :                                            NULL, NULL, "aggr.submedian");
     891             : }
     892             : 
     893             : static str
     894           0 : AGGRsubmediancand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     895             : {
     896           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     897             :                                            0, 0, TYPE_any, BATgroupmedian, NULL,
     898             :                                            NULL, NULL, "aggr.submedian");
     899             : }
     900             : 
     901             : /* quantile functions, could make median functions obsolete completely */
     902             : static str
     903          24 : AGGRquantile(void *retval, const bat *bid, const bat *qid)
     904             : {
     905             :         str err;
     906             :         bat rval;
     907          24 :         if ((err = AGGRgrouped(&rval, NULL, bid, NULL, NULL, NULL, 1,
     908             :                                                    0, 0, TYPE_any, NULL, NULL, BATgroupquantile,
     909             :                                                    qid, "aggr.subquantile")) == MAL_SUCCEED) {
     910          20 :                 oid pos = 0;
     911          20 :                 err = ALGfetchoid(retval, &rval, &pos);
     912          20 :                 BBPrelease(rval);
     913             :         }
     914          24 :         return err;
     915             : }
     916             : 
     917             : static str
     918          13 : AGGRsubquantile(bat *retval, const bat *bid, const bat *quantile, const bat *gid, const bat *eid, const bit *skip_nils)
     919             : {
     920          13 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     921             :                                            0, 0, TYPE_any, NULL, NULL, BATgroupquantile,
     922             :                                            quantile, "aggr.subquantile");
     923             : }
     924             : 
     925             : static str
     926           0 : AGGRsubquantilecand(bat *retval, const bat *bid, const bat *quantile, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     927             : {
     928           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     929             :                                            0, 0, TYPE_any, NULL, NULL, BATgroupquantile,
     930             :                                            quantile, "aggr.subquantile");
     931             : }
     932             : 
     933             : static str
     934           2 : AGGRmedian_avg(dbl *retval, const bat *bid)
     935             : {
     936             :         str err;
     937             :         bat rval;
     938           2 :         if ((err = AGGRgrouped(&rval, NULL, bid, NULL, NULL, NULL, 1,
     939             :                                                    0, 0, TYPE_any, BATgroupmedian_avg, NULL,
     940             :                                                    NULL, NULL, "aggr.submedian_avg")) == MAL_SUCCEED) {
     941           2 :                 oid pos = 0;
     942           2 :                 err = ALGfetchoid(retval, &rval, &pos);
     943           2 :                 BBPrelease(rval);
     944             :         }
     945           2 :         return err;
     946             : }
     947             : 
     948             : static str
     949           1 : AGGRsubmedian_avg(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils)
     950             : {
     951           1 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     952             :                                            0, 0, TYPE_any, BATgroupmedian_avg, NULL,
     953             :                                            NULL, NULL, "aggr.submedian_avg");
     954             : }
     955             : 
     956             : static str
     957           0 : AGGRsubmediancand_avg(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     958             : {
     959           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     960             :                                            0, 0, TYPE_any, BATgroupmedian_avg, NULL,
     961             :                                            NULL, NULL, "aggr.submedian_avg");
     962             : }
     963             : 
     964             : /* quantile functions, could make median functions obsolete completely */
     965             : static str
     966           2 : AGGRquantile_avg(dbl *retval, const bat *bid, const bat *qid)
     967             : {
     968             :         str err;
     969             :         bat rval;
     970           2 :         if ((err = AGGRgrouped(&rval, NULL, bid, NULL, NULL, NULL, 1,
     971             :                                                    0, 0, TYPE_any, NULL, NULL, BATgroupquantile_avg,
     972             :                                                    qid, "aggr.subquantile_avg")) == MAL_SUCCEED) {
     973           2 :                 oid pos = 0;
     974           2 :                 err = ALGfetchoid(retval, &rval, &pos);
     975           2 :                 BBPrelease(rval);
     976             :         }
     977           2 :         return err;
     978             : }
     979             : 
     980             : static str
     981           1 : AGGRsubquantile_avg(bat *retval, const bat *bid, const bat *quantile, const bat *gid, const bat *eid, const bit *skip_nils)
     982             : {
     983           1 :         return AGGRgrouped(retval, NULL, bid, gid, eid, NULL, *skip_nils,
     984             :                                            0, 0, TYPE_any, NULL, NULL, BATgroupquantile_avg,
     985             :                                            quantile, "aggr.subquantile_avg");
     986             : }
     987             : 
     988             : static str
     989           0 : AGGRsubquantilecand_avg(bat *retval, const bat *bid, const bat *quantile, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils)
     990             : {
     991           0 :         return AGGRgrouped(retval, NULL, bid, gid, eid, sid, *skip_nils,
     992             :                                            0, 0, TYPE_any, NULL, NULL, BATgroupquantile_avg,
     993             :                                            quantile, "aggr.subquantile_avg");
     994             : }
     995             : 
     996             : static str
     997          49 : AGGRgroup_str_concat(bat *retval1, const bat *bid, const bat *gid, const bat *eid, const bat *sid, bool skip_nils,
     998             :                                          bool abort_on_error, const bat *sepid, const char *separator, const char *malfunc)
     999             : {
    1000             :         BAT *b, *g, *e, *s, *sep, *bn = NULL;
    1001             : 
    1002          49 :         b = BATdescriptor(*bid);
    1003          49 :         g = gid ? BATdescriptor(*gid) : NULL;
    1004          49 :         e = eid ? BATdescriptor(*eid) : NULL;
    1005          49 :         s = sid ? BATdescriptor(*sid) : NULL;
    1006          49 :         sep = sepid ? BATdescriptor(*sepid) : NULL;
    1007             : 
    1008          49 :         if (b == NULL || (gid != NULL && g == NULL) || (eid != NULL && e == NULL) ||
    1009          49 :                 (sid != NULL && s == NULL) || (sepid != NULL && sep == NULL)) {
    1010           0 :                 if (b)
    1011           0 :                         BBPunfix(b->batCacheid);
    1012           0 :                 if (g)
    1013           0 :                         BBPunfix(g->batCacheid);
    1014           0 :                 if (e)
    1015           0 :                         BBPunfix(e->batCacheid);
    1016           0 :                 if (s)
    1017           0 :                         BBPunfix(s->batCacheid);
    1018           0 :                 if (sep)
    1019           0 :                         BBPunfix(sep->batCacheid);
    1020           0 :                 throw(MAL, malfunc, SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
    1021             :         }
    1022             : 
    1023          49 :         bn = BATgroupstr_group_concat(b, g, e, s, sep, skip_nils, abort_on_error, separator);
    1024             : 
    1025          49 :         BBPunfix(b->batCacheid);
    1026          49 :         if (g)
    1027          49 :                 BBPunfix(g->batCacheid);
    1028          49 :         if (e)
    1029          49 :                 BBPunfix(e->batCacheid);
    1030          49 :         if (s)
    1031           0 :                 BBPunfix(s->batCacheid);
    1032          49 :         if (sep)
    1033          30 :                 BBPunfix(sep->batCacheid);
    1034          49 :         if (bn == NULL)
    1035           0 :                 throw(MAL, malfunc, GDK_EXCEPTION);
    1036          49 :         *retval1 = bn->batCacheid;
    1037          49 :         BBPkeepref(bn->batCacheid);
    1038          49 :         return MAL_SUCCEED;
    1039             : }
    1040             : 
    1041             : #define DEFAULT_SEPARATOR ","
    1042             : 
    1043             : static str
    1044           0 : AGGRstr_group_concat(bat *retval, const bat *bid, const bat *gid, const bat *eid)
    1045             : {
    1046           0 :         return AGGRgroup_str_concat(retval, bid, gid, eid, NULL, 1, 1, NULL, DEFAULT_SEPARATOR, "aggr.str_group_concat");
    1047             : }
    1048             : 
    1049             : static str
    1050          19 : AGGRsubstr_group_concat(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
    1051             : {
    1052          19 :         return AGGRgroup_str_concat(retval, bid, gid, eid, NULL, *skip_nils, *abort_on_error, NULL, DEFAULT_SEPARATOR, "aggr.substr_group_concat");
    1053             : }
    1054             : 
    1055             : static str
    1056           0 : AGGRsubstr_group_concatcand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
    1057             : {
    1058           0 :         return AGGRgroup_str_concat(retval, bid, gid, eid, sid, *skip_nils, *abort_on_error, NULL, DEFAULT_SEPARATOR, "aggr.substr_group_concat");
    1059             : }
    1060             : 
    1061             : static str
    1062           0 : AGGRstr_group_concat_sep(bat *retval, const bat *bid, const bat *sep, const bat *gid, const bat *eid)
    1063             : {
    1064           0 :         return AGGRgroup_str_concat(retval, bid, gid, eid, NULL, true, true, sep, NULL, "aggr.str_group_concat_sep");;
    1065             : }
    1066             : 
    1067             : static str
    1068          30 : AGGRsubstr_group_concat_sep(bat *retval, const bat *bid, const bat *sep, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
    1069             : {
    1070          30 :         return AGGRgroup_str_concat(retval, bid, gid, eid, NULL, *skip_nils, *abort_on_error, sep, NULL, "aggr.substr_group_concat_sep");
    1071             : }
    1072             : 
    1073             : static str
    1074           0 : AGGRsubstr_group_concatcand_sep(bat *retval, const bat *bid, const bat *sep, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
    1075             : {
    1076           0 :         return AGGRgroup_str_concat(retval, bid, gid, eid, sid, *skip_nils, *abort_on_error, sep, NULL, "aggr.substr_group_concat_sep");
    1077             : }
    1078             : 
    1079             : static str
    1080         106 : AGGRgrouped2(bat *retval, const bat *bid1, const bat *bid2, const bat *gid, const bat *eid, const bat *sid, bool skip_nils, bool abort_on_error,
    1081             :                          int tp, BAT *(*func)(BAT *, BAT *, BAT *, BAT *, BAT *, int tp, bool skip_nils, bool abort_on_error),
    1082             :                          const char *malfunc)
    1083             : {
    1084             :         BAT *b1, *b2, *g, *e, *s, *bn = NULL;
    1085             : 
    1086         106 :         assert(func != NULL);
    1087             : 
    1088         106 :         b1 = BATdescriptor(*bid1);
    1089         106 :         b2 = BATdescriptor(*bid2);
    1090         106 :         g = gid ? BATdescriptor(*gid) : NULL;
    1091         106 :         e = eid ? BATdescriptor(*eid) : NULL;
    1092         106 :         s = sid ? BATdescriptor(*sid) : NULL;
    1093             : 
    1094         106 :         if (b1 == NULL || b2 == NULL || (gid != NULL && g == NULL) || (eid != NULL && e == NULL) ||
    1095         106 :                 (sid != NULL && s == NULL)) {
    1096           0 :                 if (b1)
    1097           0 :                         BBPunfix(b1->batCacheid);
    1098           0 :                 if (b2)
    1099           0 :                         BBPunfix(b2->batCacheid);
    1100           0 :                 if (g)
    1101           0 :                         BBPunfix(g->batCacheid);
    1102           0 :                 if (e)
    1103           0 :                         BBPunfix(e->batCacheid);
    1104           0 :                 if (s)
    1105           0 :                         BBPunfix(s->batCacheid);
    1106           0 :                 throw(MAL, malfunc, SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
    1107             :         }
    1108             : 
    1109         106 :         if (b1->ttype != b2->ttype) {
    1110           0 :                 BBPunfix(b1->batCacheid);
    1111           0 :                 BBPunfix(b2->batCacheid);
    1112           0 :                 if (g)
    1113           0 :                         BBPunfix(g->batCacheid);
    1114           0 :                 if (e)
    1115           0 :                         BBPunfix(e->batCacheid);
    1116           0 :                 if (s)
    1117           0 :                         BBPunfix(s->batCacheid);
    1118           0 :                 throw(MAL, malfunc, SQLSTATE(42000) "%s requires both arguments of the same type", malfunc);
    1119             :         }
    1120             : 
    1121         106 :         bn = (*func)(b1, b2, g, e, s, tp, skip_nils, abort_on_error);
    1122             : 
    1123         106 :         BBPunfix(b1->batCacheid);
    1124         106 :         BBPunfix(b2->batCacheid);
    1125         106 :         if (g)
    1126         106 :                 BBPunfix(g->batCacheid);
    1127         106 :         if (e)
    1128         106 :                 BBPunfix(e->batCacheid);
    1129         106 :         if (s)
    1130           0 :                 BBPunfix(s->batCacheid);
    1131         106 :         if (bn == NULL)
    1132           1 :                 throw(MAL, malfunc, GDK_EXCEPTION);
    1133         105 :         *retval = bn->batCacheid;
    1134         105 :         BBPkeepref(bn->batCacheid);
    1135         105 :         return MAL_SUCCEED;
    1136             : }
    1137             : 
    1138             : static str
    1139           0 : AGGRcovariance(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid)
    1140             : {
    1141           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, 1, 0, TYPE_dbl, BATgroupcovariance_sample, "aggr.covariance");
    1142             : }
    1143             : 
    1144             : static str
    1145          30 : AGGRsubcovariance(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
    1146             : {
    1147          30 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcovariance_sample, "aggr.subcovariance");
    1148             : }
    1149             : 
    1150             : static str
    1151           0 : AGGRsubcovariancecand(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
    1152             : {
    1153           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, sid, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcovariance_sample, "aggr.subcovariance");
    1154             : }
    1155             : 
    1156             : static str
    1157           0 : AGGRcovariancep(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid)
    1158             : {
    1159           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, 1, 0, TYPE_dbl, BATgroupcovariance_population, "aggr.covariancep");
    1160             : }
    1161             : 
    1162             : static str
    1163          30 : AGGRsubcovariancep(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
    1164             : {
    1165          30 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcovariance_population, "aggr.subcovariancep");
    1166             : }
    1167             : 
    1168             : static str
    1169           0 : AGGRsubcovariancepcand(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
    1170             : {
    1171           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, sid, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcovariance_population, "aggr.subcovariancep");
    1172             : }
    1173             : 
    1174             : static str
    1175           0 : AGGRcorr(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid)
    1176             : {
    1177           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, 1, 0, TYPE_dbl, BATgroupcorrelation, "aggr.corr");
    1178             : }
    1179             : 
    1180             : static str
    1181          46 : AGGRsubcorr(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bit *skip_nils, const bit *abort_on_error)
    1182             : {
    1183          46 :         return AGGRgrouped2(retval, b1, b2, gid, eid, NULL, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcorrelation, "aggr.subcorr");
    1184             : }
    1185             : 
    1186             : static str
    1187           0 : AGGRsubcorrcand(bat *retval, const bat *b1, const bat *b2, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils, const bit *abort_on_error)
    1188             : {
    1189           0 :         return AGGRgrouped2(retval, b1, b2, gid, eid, sid, *skip_nils, *abort_on_error, TYPE_dbl, BATgroupcorrelation, "aggr.subcorr");
    1190             : }
    1191             : 
    1192             : #include "mel.h"
    1193             : mel_func aggr_init_funcs[] = {
    1194             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1195             :  command("aggr", "sum", AGGRsum3_bte, false, "Grouped tail sum on bte", args(1,4, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1196             :  command("aggr", "subsum", AGGRsubsum_bte, false, "Grouped sum aggregate", args(1,6, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1197             :  command("aggr", "subsum", AGGRsubsumcand_bte, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1198             :  command("aggr", "prod", AGGRprod3_bte, false, "Grouped tail product on bte", args(1,4, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1199             :  command("aggr", "subprod", AGGRsubprod_bte, false, "Grouped product aggregate", args(1,6, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1200             :  command("aggr", "subprod", AGGRsubprodcand_bte, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",bte),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1201             :  command("aggr", "sum", AGGRsum3_sht, false, "Grouped tail sum on bte", args(1,4, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1202             :  command("aggr", "subsum", AGGRsubsum_sht, false, "Grouped sum aggregate", args(1,6, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1203             :  command("aggr", "subsum", AGGRsubsumcand_sht, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1204             :  command("aggr", "prod", AGGRprod3_sht, false, "Grouped tail product on bte", args(1,4, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1205             :  command("aggr", "subprod", AGGRsubprod_sht, false, "Grouped product aggregate", args(1,6, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1206             :  command("aggr", "subprod", AGGRsubprodcand_sht, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",sht),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1207             :  command("aggr", "sum", AGGRsum3_int, false, "Grouped tail sum on bte", args(1,4, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1208             :  command("aggr", "subsum", AGGRsubsum_int, false, "Grouped sum aggregate", args(1,6, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1209             :  command("aggr", "subsum", AGGRsubsumcand_int, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1210             :  command("aggr", "prod", AGGRprod3_int, false, "Grouped tail product on bte", args(1,4, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1211             :  command("aggr", "subprod", AGGRsubprod_int, false, "Grouped product aggregate", args(1,6, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1212             :  command("aggr", "subprod", AGGRsubprodcand_int, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",int),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1213             :  command("aggr", "sum", AGGRsum3_lng, false, "Grouped tail sum on bte", args(1,4, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1214             :  command("aggr", "subsum", AGGRsubsum_lng, false, "Grouped sum aggregate", args(1,6, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1215             :  command("aggr", "subsum", AGGRsubsumcand_lng, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1216             :  command("aggr", "prod", AGGRprod3_lng, false, "Grouped tail product on bte", args(1,4, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1217             :  command("aggr", "subprod", AGGRsubprod_lng, false, "Grouped product aggregate", args(1,6, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1218             :  command("aggr", "subprod", AGGRsubprodcand_lng, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1219             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1220             :  command("aggr", "sum", AGGRsum3_sht, false, "Grouped tail sum on sht", args(1,4, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1221             :  command("aggr", "subsum", AGGRsubsum_sht, false, "Grouped sum aggregate", args(1,6, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1222             :  command("aggr", "subsum", AGGRsubsumcand_sht, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1223             :  command("aggr", "prod", AGGRprod3_sht, false, "Grouped tail product on sht", args(1,4, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1224             :  command("aggr", "subprod", AGGRsubprod_sht, false, "Grouped product aggregate", args(1,6, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1225             :  command("aggr", "subprod", AGGRsubprodcand_sht, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",sht),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1226             :  command("aggr", "sum", AGGRsum3_int, false, "Grouped tail sum on sht", args(1,4, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1227             :  command("aggr", "subsum", AGGRsubsum_int, false, "Grouped sum aggregate", args(1,6, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1228             :  command("aggr", "subsum", AGGRsubsumcand_int, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1229             :  command("aggr", "prod", AGGRprod3_int, false, "Grouped tail product on sht", args(1,4, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1230             :  command("aggr", "subprod", AGGRsubprod_int, false, "Grouped product aggregate", args(1,6, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1231             :  command("aggr", "subprod", AGGRsubprodcand_int, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",int),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1232             :  command("aggr", "sum", AGGRsum3_lng, false, "Grouped tail sum on sht", args(1,4, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1233             :  command("aggr", "subsum", AGGRsubsum_lng, false, "Grouped sum aggregate", args(1,6, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1234             :  command("aggr", "subsum", AGGRsubsumcand_lng, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1235             :  command("aggr", "prod", AGGRprod3_lng, false, "Grouped tail product on sht", args(1,4, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1236             :  command("aggr", "subprod", AGGRsubprod_lng, false, "Grouped product aggregate", args(1,6, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1237             :  command("aggr", "subprod", AGGRsubprodcand_lng, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1238             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1239             :  command("aggr", "sum", AGGRsum3_int, false, "Grouped tail sum on int", args(1,4, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1240             :  command("aggr", "subsum", AGGRsubsum_int, false, "Grouped sum aggregate", args(1,6, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1241             :  command("aggr", "subsum", AGGRsubsumcand_int, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1242             :  command("aggr", "prod", AGGRprod3_int, false, "Grouped tail product on int", args(1,4, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1243             :  command("aggr", "subprod", AGGRsubprod_int, false, "Grouped product aggregate", args(1,6, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1244             :  command("aggr", "subprod", AGGRsubprodcand_int, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",int),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1245             :  command("aggr", "sum", AGGRsum3_lng, false, "Grouped tail sum on int", args(1,4, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1246             :  command("aggr", "subsum", AGGRsubsum_lng, false, "Grouped sum aggregate", args(1,6, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1247             :  command("aggr", "subsum", AGGRsubsumcand_lng, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1248             :  command("aggr", "prod", AGGRprod3_lng, false, "Grouped tail product on int", args(1,4, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1249             :  command("aggr", "subprod", AGGRsubprod_lng, false, "Grouped product aggregate", args(1,6, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1250             :  command("aggr", "subprod", AGGRsubprodcand_lng, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1251             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1252             :  command("aggr", "sum", AGGRsum3_lng, false, "Grouped tail sum on lng", args(1,4, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1253             :  command("aggr", "subsum", AGGRsubsum_lng, false, "Grouped sum aggregate", args(1,6, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1254             :  command("aggr", "subsum", AGGRsubsumcand_lng, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1255             :  command("aggr", "prod", AGGRprod3_lng, false, "Grouped tail product on lng", args(1,4, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1256             :  command("aggr", "subprod", AGGRsubprod_lng, false, "Grouped product aggregate", args(1,6, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1257             :  command("aggr", "subprod", AGGRsubprodcand_lng, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1258             :  command("aggr", "sum", AGGRsum3_flt, false, "Grouped tail sum on flt", args(1,4, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1259             :  command("aggr", "subsum", AGGRsubsum_flt, false, "Grouped sum aggregate", args(1,6, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1260             :  command("aggr", "subsum", AGGRsubsumcand_flt, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1261             :  command("aggr", "prod", AGGRprod3_flt, false, "Grouped tail product on flt", args(1,4, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1262             :  command("aggr", "subprod", AGGRsubprod_flt, false, "Grouped product aggregate", args(1,6, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1263             :  command("aggr", "subprod", AGGRsubprodcand_flt, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",flt),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1264             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1265             :  command("aggr", "subsum", AGGRsubsum_dbl, false, "Grouped sum aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1266             :  command("aggr", "subsum", AGGRsubsumcand_dbl, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1267             :  command("aggr", "prod", AGGRprod3_dbl, false, "Grouped tail product on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1268             :  command("aggr", "subprod", AGGRsubprod_dbl, false, "Grouped product aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1269             :  command("aggr", "subprod", AGGRsubprodcand_dbl, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1270             :  command("aggr", "sum", AGGRsum3_dbl, false, "Grouped tail sum on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1271             :  command("aggr", "subsum", AGGRsubsum_dbl, false, "Grouped sum aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1272             :  command("aggr", "subsum", AGGRsubsumcand_dbl, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1273             :  command("aggr", "prod", AGGRprod3_dbl, false, "Grouped tail product on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1274             :  command("aggr", "subprod", AGGRsubprod_dbl, false, "Grouped product aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1275             :  command("aggr", "subprod", AGGRsubprodcand_dbl, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1276             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1277             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on bte, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1278             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on bte", args(1,5, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1279             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on bte, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1280             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1281             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1282             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1283             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1284             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1285             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1286             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1287             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1288             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1289             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1290             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1291             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1292             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1293             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1294             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1295             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1296             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1297             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on bte", args(1,4, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1298             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1299             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1300             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1))),
    1301             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1302             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1303             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1))),
    1304             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1305             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1306             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1))),
    1307             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1308             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",bte),batarg("b2",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1309             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1310             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on sht, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1311             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on sht", args(1,5, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1312             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on sht, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1313             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1314             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1315             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1316             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1317             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1318             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1319             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1320             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1321             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1322             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1323             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1324             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1325             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1326             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1327             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1328             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1329             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1330             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on sht", args(1,4, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1331             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1332             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1333             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1))),
    1334             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1335             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1336             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1))),
    1337             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1338             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1339             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1))),
    1340             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1341             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",sht),batarg("b2",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1342             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1343             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on int, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1344             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on int", args(1,5, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1345             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on int, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1346             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1347             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1348             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1349             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1350             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1351             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1352             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1353             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1354             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1355             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1356             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1357             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1358             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1359             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1360             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1361             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1362             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1363             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on int", args(1,4, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1364             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1365             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1366             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1))),
    1367             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1368             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1369             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1))),
    1370             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1371             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1372             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1))),
    1373             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1374             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",int),batarg("b2",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1375             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1376             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on lng, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1377             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on lng", args(1,5, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1378             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on lng, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1379             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1380             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1381             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1382             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1383             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1384             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1385             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1386             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1387             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1388             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1389             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1390             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1391             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1392             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1393             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1394             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1395             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1396             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on lng", args(1,4, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1397             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1398             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1399             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1))),
    1400             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1401             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1402             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1))),
    1403             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1404             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1405             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1))),
    1406             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1407             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",lng),batarg("b2",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1408             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1409             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on flt, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1410             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on flt", args(1,5, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1411             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on flt, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1412             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1413             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1414             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1415             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1416             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1417             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1418             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1419             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1420             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1421             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1422             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1423             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1424             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1425             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1426             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1427             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1428             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1429             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on flt", args(1,4, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1))),
    1430             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1431             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1432             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1))),
    1433             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1434             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1435             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1))),
    1436             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1437             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1438             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1))),
    1439             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1440             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",flt),batarg("b2",flt),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1441             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1442             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on dbl, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1443             :  command("aggr", "avg", AGGRavg14_dbl, false, "Grouped tail average on dbl", args(1,5, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1444             :  command("aggr", "avg", AGGRavg24_dbl, false, "Grouped tail average on dbl, also returns count", args(2,6, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("scale",int))),
    1445             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1446             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1447             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1448             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1449             :  command("aggr", "subavg", AGGRsubavg1s_dbl, false, "Grouped average aggregate", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1450             :  command("aggr", "subavg", AGGRsubavg1scand_dbl, false, "Grouped average aggregate with candidates list", args(1,8, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1451             :  command("aggr", "subavg", AGGRsubavg2s_dbl, false, "Grouped average aggregate, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1452             :  command("aggr", "subavg", AGGRsubavg2scand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,9, batarg("",dbl),batarg("",lng),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit),arg("scale",int))),
    1453             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1454             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1455             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1456             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1457             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1458             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1459             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1460             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1461             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1462             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on dbl", args(1,4, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1))),
    1463             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1464             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1465             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1))),
    1466             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1467             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1468             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1))),
    1469             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1470             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1471             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1))),
    1472             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1473             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",dbl),batarg("b2",dbl),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1474             :  command("aggr", "min", AGGRmin3, false, "", args(1,4, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2))),
    1475             :  command("aggr", "max", AGGRmax3, false, "", args(1,4, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2))),
    1476             :  command("aggr", "submin", AGGRsubmin, false, "Grouped minimum aggregate", args(1,5, batarg("",oid),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1477             :  command("aggr", "submin", AGGRsubmincand, false, "Grouped minimum aggregate with candidates list", args(1,6, batarg("",oid),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1478             :  command("aggr", "submax", AGGRsubmax, false, "Grouped maximum aggregate", args(1,5, batarg("",oid),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1479             :  command("aggr", "submax", AGGRsubmaxcand, false, "Grouped maximum aggregate with candidates list", args(1,6, batarg("",oid),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1480             :  command("aggr", "submin", AGGRsubmin_val, false, "Grouped minimum aggregate", args(1,5, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1481             :  command("aggr", "submin", AGGRsubmincand_val, false, "Grouped minimum aggregate with candidates list", args(1,6, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1482             :  command("aggr", "submax", AGGRsubmax_val, false, "Grouped maximum aggregate", args(1,5, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1483             :  command("aggr", "submax", AGGRsubmaxcand_val, false, "Grouped maximum aggregate with candidates list", args(1,6, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1484             :  command("aggr", "count", AGGRcount3, false, "", args(1,5, batarg("",lng),batargany("b",1),batarg("g",oid),batargany("e",2),arg("ignorenils",bit))),
    1485             :  command("aggr", "count", AGGRcount3nils, false, "Grouped count", args(1,4, batarg("",lng),batargany("b",1),batarg("g",oid),batargany("e",2))),
    1486             :  command("aggr", "count_no_nil", AGGRcount3nonils, false, "", args(1,4, batarg("",lng),batargany("b",1),batarg("g",oid),batargany("e",2))),
    1487             :  command("aggr", "subcount", AGGRsubcount, false, "Grouped count aggregate", args(1,5, batarg("",lng),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1488             :  command("aggr", "subcount", AGGRsubcountcand, false, "Grouped count aggregate with candidates list", args(1,6, batarg("",lng),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1489             :  command("aggr", "median", AGGRmedian, false, "Median aggregate", args(1,2, argany("",1),batargany("b",1))),
    1490             :  command("aggr", "submedian", AGGRsubmedian, false, "Grouped median aggregate", args(1,5, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1491             :  command("aggr", "submedian", AGGRsubmediancand, false, "Grouped median aggregate with candidate list", args(1,6, batargany("",1),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1492             :  command("aggr", "quantile", AGGRquantile, false, "Quantile aggregate", args(1,3, argany("",1),batargany("b",1),batarg("q",dbl))),
    1493             :  command("aggr", "subquantile", AGGRsubquantile, false, "Grouped quantile aggregate", args(1,6, batargany("",1),batargany("b",1),batarg("q",dbl),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1494             :  command("aggr", "subquantile", AGGRsubquantilecand, false, "Grouped quantile aggregate with candidate list", args(1,7, batargany("",1),batargany("b",1),batarg("q",dbl),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1495             :  command("aggr", "median_avg", AGGRmedian_avg, false, "Median aggregate", args(1,2, arg("",dbl),batargany("b",1))),
    1496             :  command("aggr", "submedian_avg", AGGRsubmedian_avg, false, "Grouped median aggregate", args(1,5, batarg("",dbl),batargany("b",1),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1497             :  command("aggr", "submedian_avg", AGGRsubmediancand_avg, false, "Grouped median aggregate with candidate list", args(1,6, batarg("",dbl),batargany("b",1),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1498             :  command("aggr", "quantile_avg", AGGRquantile_avg, false, "Quantile aggregate", args(1,3, arg("",dbl),batargany("b",1),batarg("q",dbl))),
    1499             :  command("aggr", "subquantile_avg", AGGRsubquantile_avg, false, "Grouped quantile aggregate", args(1,6, batarg("",dbl),batargany("b",1),batarg("q",dbl),batarg("g",oid),batargany("e",2),arg("skip_nils",bit))),
    1500             :  command("aggr", "subquantile_avg", AGGRsubquantilecand_avg, false, "Grouped quantile aggregate with candidate list", args(1,7, batarg("",dbl),batargany("b",1),batarg("q",dbl),batarg("g",oid),batargany("e",2),batarg("s",oid),arg("skip_nils",bit))),
    1501             :  command("aggr", "str_group_concat", AGGRstr_group_concat, false, "Grouped string tail concat", args(1,4, batarg("",str),batarg("b",str),batarg("g",oid),batargany("e",1))),
    1502             :  command("aggr", "substr_group_concat", AGGRsubstr_group_concat, false, "Grouped string concat", args(1,6, batarg("",str),batarg("b",str),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1503             :  command("aggr", "substr_group_concat", AGGRsubstr_group_concatcand, false, "Grouped string concat with candidates list", args(1,7, batarg("",str),batarg("b",str),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1504             :  command("aggr", "str_group_concat", AGGRstr_group_concat_sep, false, "Grouped string tail concat with custom separator", args(1,5, batarg("",str),batarg("b",str),batarg("sep",str),batarg("g",oid),batargany("e",1))),
    1505             :  command("aggr", "substr_group_concat", AGGRsubstr_group_concat_sep, false, "Grouped string concat with custom separator", args(1,7, batarg("",str),batarg("b",str),batarg("sep",str),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1506             :  command("aggr", "substr_group_concat", AGGRsubstr_group_concatcand_sep, false, "Grouped string concat with candidates list with custom separator", args(1,8, batarg("",str),batarg("b",str),batarg("sep",str),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1507             : 
    1508             :  command("aggr", "subavg", AGGRavg3, false, "Grouped average aggregation", args(3,8, batarg("",bte),batarg("",lng),batarg("",lng),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit))),
    1509             :  command("aggr", "subavg", AGGRavg3, false, "Grouped average aggregation", args(3,8, batarg("",sht),batarg("",lng),batarg("",lng),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit))),
    1510             :  command("aggr", "subavg", AGGRavg3, false, "Grouped average aggregation", args(3,8, batarg("",int),batarg("",lng),batarg("",lng),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit))),
    1511             :  command("aggr", "subavg", AGGRavg3, false, "Grouped average aggregation", args(3,8, batarg("",lng),batarg("",lng),batarg("",lng),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit))),
    1512             : #ifdef HAVE_HGE
    1513             :  command("aggr", "subavg", AGGRavg3, false, "Grouped average aggregation", args(3,8, batarg("",hge),batarg("",lng),batarg("",lng),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit))),
    1514             : #endif
    1515             :  command("aggr", "subavg", AGGRavg3comb, false, "Grouped average aggregation combiner", args(1,7, batarg("",bte),batarg("b",bte),batarg("r",lng),batarg("c",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit))),
    1516             :  command("aggr", "subavg", AGGRavg3comb, false, "Grouped average aggregation combiner", args(1,7, batarg("",sht),batarg("b",sht),batarg("r",lng),batarg("c",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit))),
    1517             :  command("aggr", "subavg", AGGRavg3comb, false, "Grouped average aggregation combiner", args(1,7, batarg("",int),batarg("b",int),batarg("r",lng),batarg("c",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit))),
    1518             :  command("aggr", "subavg", AGGRavg3comb, false, "Grouped average aggregation combiner", args(1,7, batarg("",lng),batarg("b",lng),batarg("r",lng),batarg("c",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit))),
    1519             : #ifdef HAVE_HGE
    1520             :  command("aggr", "subavg", AGGRavg3comb, false, "Grouped average aggregation combiner", args(1,7, batarg("",hge),batarg("b",hge),batarg("r",lng),batarg("c",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit))),
    1521             : #endif
    1522             : 
    1523             : #ifdef HAVE_HGE
    1524             :  command("aggr", "sum", AGGRsum3_hge, false, "Grouped tail sum on bte", args(1,4, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1525             :  command("aggr", "subsum", AGGRsubsum_hge, false, "Grouped sum aggregate", args(1,6, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1526             :  command("aggr", "subsum", AGGRsubsumcand_hge, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1527             :  command("aggr", "prod", AGGRprod3_hge, false, "Grouped tail product on bte", args(1,4, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1))),
    1528             :  command("aggr", "subprod", AGGRsubprod_hge, false, "Grouped product aggregate", args(1,6, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1529             :  command("aggr", "subprod", AGGRsubprodcand_hge, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",bte),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1530             :  command("aggr", "sum", AGGRsum3_hge, false, "Grouped tail sum on sht", args(1,4, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1531             :  command("aggr", "subsum", AGGRsubsum_hge, false, "Grouped sum aggregate", args(1,6, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1532             :  command("aggr", "subsum", AGGRsubsumcand_hge, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1533             :  command("aggr", "prod", AGGRprod3_hge, false, "Grouped tail product on sht", args(1,4, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1))),
    1534             :  command("aggr", "subprod", AGGRsubprod_hge, false, "Grouped product aggregate", args(1,6, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1535             :  command("aggr", "subprod", AGGRsubprodcand_hge, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",sht),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1536             :  command("aggr", "sum", AGGRsum3_hge, false, "Grouped tail sum on int", args(1,4, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1537             :  command("aggr", "subsum", AGGRsubsum_hge, false, "Grouped sum aggregate", args(1,6, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1538             :  command("aggr", "subsum", AGGRsubsumcand_hge, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1539             :  command("aggr", "prod", AGGRprod3_hge, false, "Grouped tail product on int", args(1,4, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1))),
    1540             :  command("aggr", "subprod", AGGRsubprod_hge, false, "Grouped product aggregate", args(1,6, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1541             :  command("aggr", "subprod", AGGRsubprodcand_hge, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",int),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1542             :  command("aggr", "sum", AGGRsum3_hge, false, "Grouped tail sum on lng", args(1,4, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1543             :  command("aggr", "subsum", AGGRsubsum_hge, false, "Grouped sum aggregate", args(1,6, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1544             :  command("aggr", "subsum", AGGRsubsumcand_hge, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1545             :  command("aggr", "prod", AGGRprod3_hge, false, "Grouped tail product on lng", args(1,4, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1))),
    1546             :  command("aggr", "subprod", AGGRsubprod_hge, false, "Grouped product aggregate", args(1,6, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1547             :  command("aggr", "subprod", AGGRsubprodcand_hge, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",lng),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1548             :  command("aggr", "sum", AGGRsum3_hge, false, "Grouped tail sum on hge", args(1,4, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1549             :  command("aggr", "subsum", AGGRsubsum_hge, false, "Grouped sum aggregate", args(1,6, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1550             :  command("aggr", "subsum", AGGRsubsumcand_hge, false, "Grouped sum aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1551             :  command("aggr", "prod", AGGRprod3_hge, false, "Grouped tail product on hge", args(1,4, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1552             :  command("aggr", "subprod", AGGRsubprod_hge, false, "Grouped product aggregate", args(1,6, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1553             :  command("aggr", "subprod", AGGRsubprodcand_hge, false, "Grouped product aggregate with candidates list", args(1,7, batarg("",hge),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1554             :  command("aggr", "avg", AGGRavg13_dbl, false, "Grouped tail average on hge", args(1,4, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1555             :  command("aggr", "avg", AGGRavg23_dbl, false, "Grouped tail average on hge, also returns count", args(2,5, batarg("",dbl),batarg("",lng),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1556             :  command("aggr", "subavg", AGGRsubavg1_dbl, false, "Grouped average aggregate", args(1,6, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1557             :  command("aggr", "subavg", AGGRsubavg1cand_dbl, false, "Grouped average aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1558             :  command("aggr", "subavg", AGGRsubavg2_dbl, false, "Grouped average aggregate, also returns count", args(2,7, batarg("",dbl),batarg("",lng),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1559             :  command("aggr", "subavg", AGGRsubavg2cand_dbl, false, "Grouped average aggregate with candidates list, also returns count", args(2,8, batarg("",dbl),batarg("",lng),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1560             :  command("aggr", "stdev", AGGRstdev3_dbl, false, "Grouped tail standard deviation (sample/non-biased) on hge", args(1,4, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1561             :  command("aggr", "substdev", AGGRsubstdev_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1562             :  command("aggr", "substdev", AGGRsubstdevcand_dbl, false, "Grouped standard deviation (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1563             :  command("aggr", "stdevp", AGGRstdevp3_dbl, false, "Grouped tail standard deviation (population/biased) on hge", args(1,4, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1564             :  command("aggr", "substdevp", AGGRsubstdevp_dbl, false, "Grouped standard deviation (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1565             :  command("aggr", "substdevp", AGGRsubstdevpcand_dbl, false, "Grouped standard deviation (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1566             :  command("aggr", "variance", AGGRvariance3_dbl, false, "Grouped tail variance (sample/non-biased) on hge", args(1,4, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1567             :  command("aggr", "subvariance", AGGRsubvariance_dbl, false, "Grouped variance (sample/non-biased) aggregate", args(1,6, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1568             :  command("aggr", "subvariance", AGGRsubvariancecand_dbl, false, "Grouped variance (sample/non-biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1569             :  command("aggr", "variancep", AGGRvariancep3_dbl, false, "Grouped tail variance (population/biased) on hge", args(1,4, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1))),
    1570             :  command("aggr", "subvariancep", AGGRsubvariancep_dbl, false, "Grouped variance (population/biased) aggregate", args(1,6, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1571             :  command("aggr", "subvariancep", AGGRsubvariancepcand_dbl, false, "Grouped variance (population/biased) aggregate with candidates list", args(1,7, batarg("",dbl),batarg("b",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1572             :  command("aggr", "covariance", AGGRcovariance, false, "Covariance sample aggregate", args(1,5, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1))),
    1573             :  command("aggr", "subcovariance", AGGRsubcovariance, false, "Grouped covariance sample aggregate", args(1,7, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1574             :  command("aggr", "subcovariance", AGGRsubcovariancecand, false, "Grouped covariance sample aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1575             :  command("aggr", "covariancep", AGGRcovariancep, false, "Covariance population aggregate", args(1,5, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1))),
    1576             :  command("aggr", "subcovariancep", AGGRsubcovariancep, false, "Grouped covariance population aggregate", args(1,7, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1577             :  command("aggr", "subcovariancep", AGGRsubcovariancepcand, false, "Grouped covariance population aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1578             :  command("aggr", "corr", AGGRcorr, false, "Correlation aggregate", args(1,5, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1))),
    1579             :  command("aggr", "subcorr", AGGRsubcorr, false, "Grouped correlation aggregate", args(1,7, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1580             :  command("aggr", "subcorr", AGGRsubcorrcand, false, "Grouped correlation aggregate with candidate list", args(1,8, batarg("",dbl),batarg("b1",hge),batarg("b2",hge),batarg("g",oid),batargany("e",1),batarg("s",oid),arg("skip_nils",bit),arg("abort_on_error",bit))),
    1581             : #endif
    1582             :  { .imp=NULL }
    1583             : };
    1584             : #include "mal_import.h"
    1585             : #ifdef _MSC_VER
    1586             : #undef read
    1587             : #pragma section(".CRT$XCU",read)
    1588             : #endif
    1589         259 : LIB_STARTUP_FUNC(init_aggr_mal)
    1590         259 : { mal_module("aggr", NULL, aggr_init_funcs); }

Generated by: LCOV version 1.14