Changeset: 8d0f3de40b12 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8d0f3de40b12
Modified Files:
        sql/backends/monet5/rel_bin.c
Branch: delete_in_vlist
Log Message:

Tried to be smart and do two joins instead of a single join with with cl.


diffs (30 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
@@ -295,7 +295,7 @@ handle_in_exps(backend *be, sql_exp *ce,
 {
        mvc *sql = be->mvc;
        node *n;
-       stmt *s = NULL, *c = exp_bin(be, ce, left, right, grp, ext, cnt, NULL);
+       stmt *r = NULL, *s = NULL, *c = exp_bin(be, ce, left, right, grp, ext, 
cnt, NULL);
 
        if (c->nrcols == 0) {
                sql_subtype *bt = sql_bind_localtype("bit");
@@ -325,9 +325,14 @@ handle_in_exps(backend *be, sql_exp *ce,
 
                s = distinct_value_list(be, value_list(be, nl, NULL, NULL));
                s = stmt_join(be, c, s, NULL, in, cmp);
-
-               if (sel)
-                       s = stmt_tinter(be, s, sel);
+               s = stmt_result(be, s, 0);
+
+               if (sel) {
+                       r = stmt_join(be, s, sel, NULL, 0, cmp_equal);
+                       r = stmt_result(be, r, 0);
+                       r = distinct_value_list(be, s);
+                       s = stmt_project(be, r, s);
+               }
        }
 
        return s;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to