Changeset: a7e5d086c34e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7e5d086c34e
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: RIntegration
Log Message:
the current implementation of passing the R query is a bit dirty.
We need to do this currently in each function/aggr call (needs to be refactored
later)
added the missing call from aggr.
diffs (32 lines):
diff --git a/sql/backends/monet5/sql_gencode.c
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -1734,14 +1734,15 @@ static int
int g = 0, e = 0, l = _dumpstmt(sql, mb, s->op1);
/* maybe a list */
char *mod, *aggrfunc;
char aggrF[64];
- int restype = s->op4.aggrval->res.type->localtype;
+ sql_subaggr *a = s->op4.aggrval;
+ int restype = a->aggr->res.type->localtype;
int complex_aggr = 0;
int abort_on_error;
- if (backend_create_func(sql, s->op4.aggrval->aggr) < 0)
+ if (backend_create_func(sql, a->aggr) < 0)
return -1;
- mod = s->op4.aggrval->aggr->mod;
- aggrfunc = s->op4.aggrval->aggr->imp;
+ mod = a->aggr->mod;
+ aggrfunc = a->aggr->imp;
if (strcmp(aggrfunc, "avg") == 0 || strcmp(aggrfunc,
"sum") == 0 || strcmp(aggrfunc, "prod") == 0)
complex_aggr = 1;
@@ -1780,6 +1781,8 @@ static int
setVarUDFtype(mb, getArg(q, 0));
}
}
+ if (a->aggr->lang == FUNC_LANG_R)
+ q = pushStr(mb, q, a->aggr->query);
if (s->op1->type != st_list) {
q = pushArgument(mb, q, l);
} else {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list