Changeset: 0cfb7b639778 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0cfb7b639778
Modified Files:
sql/server/rel_select.c
Branch: default
Log Message:
merged with jun2016
diffs (49 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
@@ -1330,19 +1330,33 @@ rel_filter(mvc *sql, sql_rel *rel, list
/* find filter function */
f = sql_bind_func_(sql->sa, s, filter_op, tl, F_FILT);
- if (!f) {
- if ((f = sql_find_func(sql->sa, s, filter_op,
list_length(exps), F_FILT, NULL)) != NULL) {
- node *n,*m = f->func->ops->h;
- list *nexps = sa_list(sql->sa);
- for(n = exps->h, m = f->func->ops->h; m && n; m =
m->next, n = n->next) {
- sql_arg *a = m->data;
- sql_exp *e = n->data;
-
- e = rel_check_type(sql, &a->type, e,
type_equal);
- list_append(nexps, e);
- }
- exps = nexps;
+ if (!f)
+ f = find_func(sql, s, filter_op, list_length(exps), F_FILT,
NULL);
+ if (f) {
+ node *n,*m = f->func->ops->h;
+ list *nexps = sa_list(sql->sa);
+
+ for(n=l->h; m && n; m = m->next, n = n->next) {
+ sql_arg *a = m->data;
+ sql_exp *e = n->data;
+
+ e = rel_check_type(sql, &a->type, e, type_equal);
+ if (!e)
+ return NULL;
+ list_append(nexps, e);
}
+ l = nexps;
+ nexps = sa_list(sql->sa);
+ for(n=r->h; m && n; m = m->next, n = n->next) {
+ sql_arg *a = m->data;
+ sql_exp *e = n->data;
+
+ e = rel_check_type(sql, &a->type, e, type_equal);
+ if (!e)
+ return NULL;
+ list_append(nexps, e);
+ }
+ r = nexps;
}
if (!f) {
return sql_error(sql, 02, "SELECT: no such FILTER function
'%s'", filter_op);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list