Discussion:
developers-list Digest, Vol 4, Issue 13
developers-list-request-d/
2012-12-17 11:00:01 UTC
Permalink
This message was forwarded from developers-list-d/***@public.gmane.org The MonetDB
mailing lists have moved to monetdb.org. Please subscribe to
developers-list-d/***@public.gmane.org, and unsubscribe from this list.
See: http://mail.monetdb.org/mailman/listinfo/developers-list

Send developers-list mailing list submissions to
developers-list-d/***@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
http://mail.monetdb.org/mailman/listinfo/developers-list
or, via email, send a message with subject or body 'help' to
developers-list-request-d/***@public.gmane.org

You can reach the person managing the list at
developers-list-owner-d/***@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of developers-list digest..."


Today's Topics:

1. Re: MonetDB: Oct2012 - fixed bug 3209, ie first crossproduct
if the ... (Ying Zhang)


----------------------------------------------------------------------

Message: 1
Date: Sun, 16 Dec 2012 20:08:01 +0100
From: Ying Zhang <Y.Zhang-rh8NL+***@public.gmane.org>
To: developers-list-d/***@public.gmane.org
Cc: checkin-list-d/***@public.gmane.org
Subject: Re: MonetDB: Oct2012 - fixed bug 3209, ie first crossproduct
if the ...
Message-ID: <DF5CBAB6-0EBB-437D-AF37-A5B5C23E804F-rh8NL+***@public.gmane.org>
Content-Type: text/plain; charset=windows-1252

Hai Niels,

Your fix works in Feb2013, but not in Oct2012?

Jennie
Changeset: 8650dce52dd8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8650dce52dd8
sql/server/rel_exp.c
sql/server/rel_exp.h
Branch: Oct2012
fixed bug 3209, ie first crossproduct if the join expression consists
of functions (these should have been pushed down, whenever possible).
diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -1032,6 +1032,44 @@ exp_is_atom( sql_exp *e )
}
static int
+exps_has_func( list *exps)
+{
+ node *n;
+ int has_func = 0;
+
+ for(n=exps->h; n && !has_func; n=n->next)
+ has_func |= exp_has_func(n->data);
+ return has_func;
+}
+
+int
+exp_has_func( sql_exp *e )
+{
+ switch (e->type) {
+ return 0;
+ return exp_has_func(e->l);
+ return 1;
+ if (e->flag == cmp_or) {
+ return (exps_has_func(e->l) || exps_has_func(e->r));
+ } else if (e->flag == cmp_in || e->flag == cmp_notin || e->flag == cmp_filter) {
+ return (exp_has_func(e->l) || exps_has_func(e->r));
+ } else {
+ return (exp_has_func(e->l) || exp_has_func(e->r) ||
+ (e->f && exp_has_func(e->f)));
+ }
+ return 0;
+ }
+ return 0;
+}
+
+static int
exp_key( sql_exp *e )
{
if (e->name)
diff --git a/sql/server/rel_exp.h b/sql/server/rel_exp.h
--- a/sql/server/rel_exp.h
+++ b/sql/server/rel_exp.h
@@ -105,6 +105,7 @@ extern int exp_is_eqjoin(sql_exp *e);
extern int exp_is_correlation(sql_exp *e, sql_rel *r );
extern int exp_is_join_exp(sql_exp *e);
extern int exp_is_atom(sql_exp *e);
+extern int exp_has_func(sql_exp *e);
extern sql_exp *exps_bind_column( list *exps, char *cname, int *ambiguous);
extern sql_exp *exps_bind_column2( list *exps, char *rname, char *cname);
_______________________________________________
checkin-list mailing list
http://mail.monetdb.org/mailman/listinfo/checkin-list
------------------------------

_______________________________________________
developers-list mailing list
developers-list-d/***@public.gmane.org
http://mail.monetdb.org/mailman/listinfo/developers-list


End of developers-list Digest, Vol 4, Issue 13
**********************************************

Loading...