Changeset: 98a7373050f8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/98a7373050f8
Modified Files:
        sql/server/rel_distribute.c
Branch: default
Log Message:

Fixes bug with rewrite_remote opt


diffs (27 lines):

diff --git a/sql/server/rel_distribute.c b/sql/server/rel_distribute.c
--- a/sql/server/rel_distribute.c
+++ b/sql/server/rel_distribute.c
@@ -376,8 +376,9 @@ rel_rewrite_remote_(visitor *v, sql_rel 
                                l->p = prop_remove(l->p, pl);
                                r->p = prop_remove(r->p, pr);
                                if (!find_prop(rel->p, PROP_REMOTE)) {
-                                       /* remove any local tids */
-                                       pl->id = 0;
+                                       /* remove local tid ONLY if no subtree 
has local parts */
+                                       if (pl->id == 0 || pr->id == 0)
+                                               pl->id = 0;
                                        /* set the new (matching) uris */
                                        pl->value.pval = uris;
                                        /* push the pl REMOTE property to the 
list of properties */
@@ -424,8 +425,9 @@ rel_rewrite_remote_(visitor *v, sql_rel 
                                        l->p = prop_remove(l->p, pl);
                                        r->p = prop_remove(r->p, pr);
                                        if (!find_prop(rel->p, PROP_REMOTE)) {
-                                               /* remove any local tids */
-                                               pl->id = 0;
+                                               /* remove local tid ONLY if no 
subtree has local parts */
+                                               if (pl->id == 0 || pr->id == 0)
+                                                       pl->id = 0;
                                                /* set the new (matching) uris 
*/
                                                pl->value.pval = uris;
                                                /* push the pl REMOTE property 
to the list of properties */
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to