Changeset: 45f1606ce31d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45f1606ce31d
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql_statement.c
Branch: graph0
Log Message:

Bugfix: codegen, move to the new API to return multiple outputs

The codegen API mil/mal to return multiple variables when invoking a statement
was changed in the master branch. With the recent merge the new API was
propagated and introduced a mismatch with what done for the graph related
statements. This fix aligns the API for these statements with the one used
for the rest of the code.


diffs (57 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
@@ -4899,7 +4899,7 @@ rel2bin_graph(backend *be, sql_rel* rel,
                query = stmt_list(be, lst1); lst1 = NULL;
 
                // in case of a SELECT intersect the two lists, so that we have 
only the columns part of the domain
-               // there is no more need to ensure the candidates are sorted, 
graph.intersect_join_lists can deal
+               // it is no more needed to ensure the candidates are sorted, 
graph.intersect_join_lists can deal
                // with it
                if(rel->op == op_graph_select){
                        query = stmt_gr8_intersect_join_lists(be, query);
diff --git a/sql/backends/monet5/sql_statement.c 
b/sql/backends/monet5/sql_statement.c
--- a/sql/backends/monet5/sql_statement.c
+++ b/sql/backends/monet5/sql_statement.c
@@ -3687,6 +3687,7 @@ stmt_gr8_intersect_join_lists(backend *b
                stmt *s = NULL; // temporary stmt
 
                s = stmt_create(be->mvc->sa, st_result);
+               s->q = q;
                s->nr = getDestVar(q);
                copy_params(n->data, s);
                list_append(l, s);
@@ -3695,14 +3696,15 @@ stmt_gr8_intersect_join_lists(backend *b
                // second parameter is easy
                list_append(l, stmt_none(be));
 
-
                // third & four parameters
                s = stmt_create(be->mvc->sa, st_result);
+               s->q = q;
                s->nr = getArg(q, 1);
                copy_params(n->data, s);
                list_append(l, s);
                n = n->next;
                s = stmt_create(be->mvc->sa, st_result);
+               s->q = q;
                s->nr = getArg(q, 2);
                copy_params(n->data, s);
                list_append(l, s);
@@ -3716,7 +3718,6 @@ stmt *
 stmt_gr8_spfw(backend *be, stmt *query, stmt *edge_from, stmt *edge_to, stmt 
*weights, int global_flags) {
        InstrPtr q = NULL;
        stmt *s = NULL;
-       int dest = -1;
        int num_output_cols = 2; // number of output columns from the operator
        stream *stream = buffer_wastream(buffer_create(1024), 
"spfw_codegen_query");
 
@@ -3825,7 +3826,7 @@ stmt_gr8_spfw(backend *be, stmt *query, 
 
        // MIL statement
        s = stmt_create(be->mvc->sa, st_gr8_spfw);
-       s->nr = dest;
+       s->nr = getDestVar(q);
        s->q = q;
        s->flag = global_flags;
        s->op1 = query;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to