Changeset: daf1f0fcc07e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=daf1f0fcc07e Modified Files: sql/storage/bat/res_table.c Branch: pyapi Log Message:
Casting scalars to a BAT in res_col_create breaks multiple aggregates, so we only do this for embedded. Fixes pyapi07. diffs (28 lines): diff --git a/sql/storage/bat/res_table.c b/sql/storage/bat/res_table.c --- a/sql/storage/bat/res_table.c +++ b/sql/storage/bat/res_table.c @@ -61,6 +61,7 @@ res_col_create(sql_trans *tr, res_table c->b = 0; c->p = NULL; c->mtype = mtype; +#ifdef _EMBEDDED_MONETDB_MONETDB_LIB_ if (mtype == TYPE_bat) { b = (BAT*)val; } else { // wrap scalar values in BATs for result consistency @@ -73,6 +74,16 @@ res_col_create(sql_trans *tr, res_table } c->b = b->batCacheid; bat_incref(c->b); +#else + if (mtype == TYPE_bat) { + b = (BAT*)val; + + c->b = b->batCacheid; + bat_incref(c->b); + } else { + c->p = ATOMdup(mtype, val); + } +#endif t->cur_col++; assert(t->cur_col <= t->nr_cols); return c; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list