Changeset: f59b25e0dd88 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f59b25e0dd88 Modified Files: sql/backends/monet5/sql_statement.c Branch: default Log Message:
only nullif still has rewrite in exp_nop diffs (35 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 @@ -3194,7 +3194,7 @@ stmt_Nop(backend *be, stmt *ops, sql_sub } } - /* handle coalesce and nullif */ + /* handle nullif */ if (list_length(ops->op4.lval) == 2 && f->func->mod && strcmp(f->func->mod, "") == 0 && f->func->imp && strcmp(f->func->imp, "") == 0) { stmt *e1 = ops->op4.lval->h->data; @@ -3202,21 +3202,7 @@ stmt_Nop(backend *be, stmt *ops, sql_sub int nrcols = 0; nrcols = e1->nrcols>e2->nrcols ? e1->nrcols:e2->nrcols; - /* nrcols */ - //coalesce(e1,e2) -> ifthenelse(isnil(e1),e2,e1) - if (strcmp(f->func->base.name, "coalesce") == 0) { - assert(0); - str mod = (!nrcols)?calcRef:batcalcRef; - q = newStmt(mb, e1->nrcols?mod:calcRef, "isnil"); - q = pushArgument(mb, q, e1->nr); - int nr = getDestVar(q); - - q = newStmt(mb, mod, "ifthenelse"); - q = pushArgument(mb, q, nr); - q = pushArgument(mb, q, e2->nr); - q = pushArgument(mb, q, e1->nr); - } - //nullif(e1,e2) -> ifthenelse(e1==e2),NULL,e1) + /* nullif(e1,e2) -> ifthenelse(e1==e2),NULL,e1) */ if (strcmp(f->func->base.name, "nullif") == 0) { str mod = (!nrcols)?calcRef:batcalcRef; sql_subtype *t = tail_type(e1); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list