Changeset: 3382245cae4b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3382245cae4b
Modified Files:
        sql/backends/monet5/sql_rdf_jgraph.c
Branch: rdf
Log Message:

Bug fix: Creating exps for intermedia union (of multi-table matching)


diffs (29 lines):

diff --git a/sql/backends/monet5/sql_rdf_jgraph.c 
b/sql/backends/monet5/sql_rdf_jgraph.c
--- a/sql/backends/monet5/sql_rdf_jgraph.c
+++ b/sql/backends/monet5/sql_rdf_jgraph.c
@@ -2168,16 +2168,20 @@ sql_rel* _group_star_pattern(mvc *c, jgr
                        list *union_exps = NULL;
                        union_exps = new_exp_list(c->sa);
                        tmprel = tbl_m_rels[0]; 
-                       for (tblIdx = 1; tblIdx < num_match_tbl; tblIdx++){
-                               sql_rel *tmprel2 = rel_setop(c->sa, tmprel, 
tbl_m_rels[tblIdx], op_union); 
-                               tmprel = tmprel2;
-                       }
+
                        if (num_match_tbl > 1){
                                get_union_expr(c, tbl_m_rels[0], union_exps); 
                                printf("Union expresion is: \n"); 
                                exps_print_ext(c, union_exps, 0, "");
-                               tmprel->exps = union_exps; 
                        }
+
+                       for (tblIdx = 1; tblIdx < num_match_tbl; tblIdx++){
+                               sql_rel *tmprel2 = rel_setop(c->sa, tmprel, 
tbl_m_rels[tblIdx], op_union); 
+                               list *tmpexps = exps_copy(c->sa, union_exps);
+                               tmprel2->exps = tmpexps; 
+                               tmprel = tmprel2;
+                       }
+
                        rel = tmprel; 
        
                        
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to