Changeset: eb094846cb5f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/eb094846cb5f
Modified Files:
sql/server/rel_select.c
Branch: default
Log Message:
Don't attempt to bind aggregate functions again (it was already done before
this call)
diffs (43 lines):
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -2840,24 +2840,19 @@ rel_unop_(mvc *sql, sql_rel *rel, sql_ex
/* handle param's early */
if (!t) {
- if (!(f = find_func(sql, sname, fname, 1, type, NULL, &found)))
{
- sql->session->status = 0; /* if the function was not
found clean the error */
- sql->errstr[0] = '\0';
- f = find_func(sql, sname, fname, 1, F_AGGR, NULL,
&found);
- }
- if (f) {
+ if ((f = find_func(sql, sname, fname, 1, type, NULL, &found))) {
sql_arg *a = f->func->ops->h->data;
t = &a->type;
if (rel_set_type_param(sql, t, rel, e,
f->func->fix_scale != INOUT && !UDF_LANG(f->func->lang)) < 0)
return NULL;
- }
- } else {
- if (!(f = bind_func(sql, sname, fname, t, NULL, type, &found)))
{
+ } else {
sql->session->status = 0; /* if the function was not
found clean the error */
sql->errstr[0] = '\0';
- f = bind_func(sql, sname, fname, t, NULL, F_AGGR,
&found);
- }
+ }
+ } else if (!(f = bind_func(sql, sname, fname, t, NULL, type, &found))) {
+ sql->session->status = 0; /* if the function was not found
clean the error */
+ sql->errstr[0] = '\0';
}
if (f && type_has_tz(t) && f->func->fix_scale == SCALE_FIX) {
@@ -2875,8 +2870,6 @@ rel_unop_(mvc *sql, sql_rel *rel, sql_ex
* the value to the type needed by this function!
*/
if (!f) {
- sql->session->status = 0; /* if the function was not found
clean the error */
- sql->errstr[0] = '\0';
while ((f = find_func(sql, sname, fname, 1, type, f, &found))
!= NULL) {
list *args = list_append(sa_list(sql->sa), e);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]