Changeset: db1efa338eb8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/db1efa338eb8
Modified Files:
sql/server/rel_unnest.c
Branch: default
Log Message:
This is also no longer needed
diffs (64 lines):
diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c
--- a/sql/server/rel_unnest.c
+++ b/sql/server/rel_unnest.c
@@ -1841,60 +1841,6 @@ rewrite_empty_project(visitor *v, sql_re
}
#define is_anyequal(sf) (strcmp((sf)->func->base.name, "sql_anyequal") == 0)
-#define is_not_anyequal(sf) (strcmp((sf)->func->base.name, "sql_not_anyequal")
== 0)
-
-#define ANYEQUAL 1
-#define NOT_ANYEQUAL 2
-static int exps_have_anyequal(list *exps, int any_or_not_anyequal);
-
-static int
-exp_has_anyequal(sql_exp *e, int any_or_not_anyequal)
-{
- if (!e)
- return 0;
- switch(e->type){
- case e_func:
- case e_aggr: {
- list *args = e->l;
- sql_subfunc *f = e->f;
-
- if (f && f->func && (any_or_not_anyequal&NOT_ANYEQUAL) &&
is_not_anyequal(f) && exps_have_rel_exp(args))
- return 1;
- if (f && f->func && (any_or_not_anyequal&ANYEQUAL) &&
is_anyequal(f) && exps_have_rel_exp(args))
- return 1;
- return exps_have_anyequal(e->l, any_or_not_anyequal);
- }
- case e_cmp:
- if (e->flag == cmp_or || e->flag == cmp_filter)
- return (exps_have_anyequal(e->l, any_or_not_anyequal)
|| exps_have_anyequal(e->r, any_or_not_anyequal));
- if (e->flag == cmp_in || e->flag == cmp_notin)
- return (exp_has_anyequal(e->l, any_or_not_anyequal) ||
exps_have_anyequal(e->r, any_or_not_anyequal));
- return (exp_has_anyequal(e->l, any_or_not_anyequal) ||
exp_has_anyequal(e->r, any_or_not_anyequal) ||
- (e->f && exp_has_anyequal(e->f,
any_or_not_anyequal)));
- case e_convert:
- return exp_has_anyequal(e->l, any_or_not_anyequal);
- case e_atom:
- return (e->f && exp_has_anyequal(e->f, any_or_not_anyequal));
- case e_psm:
- case e_column:
- return 0;
- }
- return 0;
-}
-
-static int
-exps_have_anyequal(list *exps, int any_or_not_anyequal)
-{
- if (list_empty(exps))
- return 0;
- for(node *n=exps->h; n; n=n->next) {
- sql_exp *e = n->data;
-
- if (exp_has_anyequal(e, any_or_not_anyequal))
- return 1;
- }
- return 0;
-}
/*
* For decimals and intervals we need to adjust the scale for some operations.
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]