Changeset: 728a124e8ecf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/728a124e8ecf
Modified Files:
        sql/backends/monet5/sql_statement.c
Branch: pushcands
Log Message:

make sure we only set the candidates when we pushed or projected


diffs (30 lines):

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
@@ -3154,7 +3154,7 @@ stmt_Nop(backend *be, stmt *ops, stmt *s
        sql_subtype *tpe = NULL;
        int push_cands = (strcmp(mod, "calc") == 0 || strcmp(mod, "mmath") == 0 
|| strcmp(mod, "mtime") == 0 ||
                (strcmp(mod, "str") == 0 && batstr_func_has_candidates(fimp)) 
|| strcmp(mod, "mkey") == 0 || strcmp(mod, "blob") == 0);
-       int pushed = 0;
+       int pushed = 0, nrcols = 0;
        node *n;
        stmt *o = NULL;
 
@@ -3168,6 +3168,8 @@ stmt_Nop(backend *be, stmt *ops, stmt *s
                        }
                        if (o->nrcols < op->nrcols)
                                o = op;
+                       if (op->nrcols)
+                               nrcols++;
                }
        }
 
@@ -3292,7 +3294,7 @@ stmt_Nop(backend *be, stmt *ops, stmt *s
                s->op4.funcval = f;
                s->nr = getDestVar(q);
                s->q = q;
-               s->cand = (pushed || (!push_cands && sel))?sel:NULL;
+               s->cand = (pushed || (!push_cands && sel && nrcols))?sel:NULL;
                return s;
        }
        return NULL;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to