Changeset: bcb7c6ae943a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/bcb7c6ae943a
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/rel_physical.c
        sql/backends/monet5/rel_pphash.c
        sql/backends/monet5/rel_util.c
        sql/backends/monet5/rel_util.h
Branch: default
Log Message:

switch the position of 'anti' and 'eqonly', since more '...only' parameter will
be added


diffs (132 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -3409,7 +3409,7 @@ rel2bin_join(backend *be, sql_rel *rel, 
                list *jexps = sa_list(sql->sa);
                sexps = sa_list(sql->sa);
 
-               split_join_exps(rel, jexps, sexps, false /* eqonly */, false /* 
anti */);
+               split_join_exps(rel, jexps, sexps, false /* anti */, false /* 
eqonly */);
                if (list_empty(jexps)) { /* cross product and continue after 
project */
                        stmt *l = bin_find_smallest_column(be, left);
                        stmt *r = bin_find_smallest_column(be, right);
@@ -3656,7 +3656,7 @@ rel2bin_antijoin(backend *be, sql_rel *r
        jexps = sa_list(sql->sa);
        sexps = sa_list(sql->sa);
 
-       split_join_exps(rel, jexps, sexps, false /* eqonly */, true /* anti */);
+       split_join_exps(rel, jexps, sexps, true /* anti */, false /* eqonly */);
        if (list_empty(jexps)) {
                stmt *l = bin_find_smallest_column(be, left);
                stmt *r = bin_find_smallest_column(be, right);
@@ -3882,7 +3882,7 @@ rel2bin_semijoin(backend *be, sql_rel *r
                list *jexps = sa_list(sql->sa);
                sexps = sa_list(sql->sa);
 
-               split_join_exps(rel, jexps, sexps, false /* eqonly */, false /* 
anti */);
+               split_join_exps(rel, jexps, sexps, false /* anti */, false /* 
eqonly */);
                if (list_empty(jexps)) { /* cross product and continue after 
project */
                        right = subrel_project(be, right, refs, rel->r);
                        stmt *l = bin_find_smallest_column(be, left);
diff --git a/sql/backends/monet5/rel_physical.c 
b/sql/backends/monet5/rel_physical.c
--- a/sql/backends/monet5/rel_physical.c
+++ b/sql/backends/monet5/rel_physical.c
@@ -889,7 +889,7 @@ rel_pipeline(visitor *v, sql_rel *rel, b
        } else if (is_semi(rel->op)) {
                list *eq_exps = sa_list(v->sql->sa);
                list *other = sa_list(v->sql->sa);
-               split_join_exps(rel, eq_exps, other, true /* eqonly */, true /* 
anti */);
+               split_join_exps(rel, eq_exps, other, true /* anti */, true /* 
eqonly */);
                bool needs_payload = (!list_empty(other));
                bool need_all = false;
                bool cross = list_empty(eq_exps);
@@ -1012,7 +1012,7 @@ rel_pipeline(visitor *v, sql_rel *rel, b
                        list *other = sa_list(v->sql->sa);
                        if (!list_empty(rel->attr))
                                rel->exps = get_simple_equi_joins_first(v->sql, 
rel, rel->exps);
-                       split_join_exps(rel, eq_exps, other, true /* eqonly */, 
true /* anti */);
+                       split_join_exps(rel, eq_exps, other, true /* anti */, 
true /* eqonly */);
 
                        sql_rel *l = rel->l, *r = rel->r;
                        sql_rel *rel_hsh = NULL, *rel_prb = NULL, *iprj = NULL, 
*pprj = NULL;
diff --git a/sql/backends/monet5/rel_pphash.c b/sql/backends/monet5/rel_pphash.c
--- a/sql/backends/monet5/rel_pphash.c
+++ b/sql/backends/monet5/rel_pphash.c
@@ -757,7 +757,7 @@ rel2bin_oahash_groupjoin(backend *be, sq
        assert(!list_empty(rel->attr));
        stmt *sub = NULL, *probe_sub = NULL;
        list *jexps = sa_list(be->mvc->sa), *sexps = sa_list(be->mvc->sa), 
*probe_side = NULL, *hash_side = NULL;
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
        stmt *probed_ids = NULL, *hash_ids = NULL;
        stmt *prb_mrk = NULL;
        bool mark = false, exist = true;
@@ -843,7 +843,7 @@ rel2bin_oahash_innerjoin(backend *be, sq
        bool hf = false;
        stmt *sub = NULL, *probed_ids = NULL;
        list *jexps = sa_list(be->mvc->sa), *sexps = sa_list(be->mvc->sa), 
*probe_side = NULL, *hash_side = NULL;
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
        bool single = rel->single && !list_empty(sexps);
 
        /* start new parallel block after join. NB get_need_pipeline has side 
effect! */
@@ -874,7 +874,7 @@ rel2bin_oahash_leftouterjoin(backend *be
 {
        stmt *sub = NULL, *probe_sub = NULL;
        list *jexps = sa_list(be->mvc->sa), *sexps = sa_list(be->mvc->sa), 
*probe_side = NULL, *hash_side = NULL;
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
        stmt *probed_ids = NULL, *hash_ids = NULL;
        stmt *prb_mrk = NULL;
 
@@ -970,7 +970,7 @@ rel2bin_oahash_rightouterjoin(backend *b
        bool hf = false;
        stmt *sub = NULL, *probed_ids = NULL;
        list *jexps = sa_list(be->mvc->sa), *sexps = sa_list(be->mvc->sa), 
*probe_side = NULL, *hash_side = NULL;
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
        bool single = rel->single && !list_empty(sexps);
 
        stmt *hsh_mrk = NULL;
@@ -1157,7 +1157,7 @@ rel2bin_oahash_fullouterjoin(backend *be
        // existing leftjoin code, extended to mark the matched payloads
        stmt *sub = NULL, *probe_sub = NULL;
        list *jexps = sa_list(sql->sa), *sexps = sa_list(sql->sa), *probe_side 
= NULL, *hash_side = NULL;
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
        stmt *probed_ids = NULL, *hash_ids = NULL;
        stmt *m = NULL, *hsh_mrk = NULL;
 
@@ -1318,7 +1318,7 @@ rel2bin_oahash_semi(backend *be, sql_rel
        list *probe_side = NULL, *hash_side = NULL;
 
        list *jexps = sa_list(be->mvc->sa), *sexps = sa_list(be->mvc->sa);
-       split_join_exps(rel, jexps, sexps, true /* eqonly */, false /* anti */);
+       split_join_exps(rel, jexps, sexps, false /* anti */, true /* eqonly */);
 
        bool anti = (list_length(jexps) == 1 && rel->op == op_anti);
        bool hf = false;
diff --git a/sql/backends/monet5/rel_util.c b/sql/backends/monet5/rel_util.c
--- a/sql/backends/monet5/rel_util.c
+++ b/sql/backends/monet5/rel_util.c
@@ -86,7 +86,7 @@ can_join_exp(sql_rel *rel, sql_exp *e, b
 }
 
 void
-split_join_exps(sql_rel *rel, list *joinable, list *not_joinable, bool eqonly, 
bool anti)
+split_join_exps(sql_rel *rel, list *joinable, list *not_joinable, bool anti, 
bool eqonly)
 {
        if (!list_empty(rel->exps)) {
                for (node *n = rel->exps->h; n; n = n->next) {
diff --git a/sql/backends/monet5/rel_util.h b/sql/backends/monet5/rel_util.h
--- a/sql/backends/monet5/rel_util.h
+++ b/sql/backends/monet5/rel_util.h
@@ -17,7 +17,7 @@
 #define is_equi_exp_(e) ((e)->flag == cmp_equal)
 
 extern bool can_join_exp(sql_rel *rel, sql_exp *e, bool anti);
-extern void split_join_exps(sql_rel *rel, list *joinable, list *not_joinable, 
bool eqonly, bool anti);
+extern void split_join_exps(sql_rel *rel, list *joinable, list *not_joinable, 
bool anti, bool eqonly);
 
 extern list *get_simple_equi_joins_first(mvc *sql, sql_rel *rel, list *exps);
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to