Changeset: f8b1df353d3e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8b1df353d3e
Modified Files:
sql/backends/monet5/sql_statement.c
Branch: Oct2020
Log Message:
Set candidate value only when applicable
diffs (40 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
@@ -3155,8 +3155,10 @@ stmt_convert(backend *be, stmt *v, stmt
q = pushInt(mb, q, 3);
}
q = pushArgument(mb, q, v->nr);
- if (sel && !pushed && !v->cand)
+ if (sel && !pushed && !v->cand) {
q = pushArgument(mb, q, sel->nr);
+ pushed = 1;
+ }
if (t->type->eclass == EC_DEC || EC_TEMP_FRAC(t->type->eclass) ||
EC_INTERVAL(t->type->eclass)) {
/* digits, scale of the result decimal */
@@ -3198,14 +3200,13 @@ stmt_convert(backend *be, stmt *v, stmt
return NULL;
}
s->op1 = v;
- s->nrcols = 0; /* function without arguments returns single
value */
s->key = v->key;
s->nrcols = v->nrcols;
s->aggr = v->aggr;
s->op4.typeval = *t;
s->nr = getDestVar(q);
s->q = q;
- s->cand = sel;
+ s->cand = pushed ? sel : NULL;
return s;
}
return NULL;
@@ -3351,7 +3352,7 @@ stmt_Nop(backend *be, stmt *ops, stmt *s
if (f->func->type == F_FUNC && f->func->lang == FUNC_LANG_INT
&& push_cands) {
for (n = ops->op4.lval->h; n; n = n->next) {
stmt *op = n->data;
-
+
if (op->nrcols > 0) {
if (op->cand && op->cand == sel) {
q = pushNil(mb, q, TYPE_bat);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list