Changeset: ecb44901b80c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ecb44901b80c Modified Files: sql/backends/monet5/sql_gencode.c Branch: arrays Log Message:
ignore joins with tid also when having dimension on the other side diffs (36 lines): diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -785,6 +785,12 @@ static int find_uselect(stmt *s){ return find_uselect(s->op3); } #endif +static bool isTid(stmt *s) { + if(!s) return false; + if(s->type == st_tid) return true; + if(s->type == st_alias) return isTid(s->op1); + return false; +} /* * @- @@ -1798,9 +1804,17 @@ static int if (cmp == cmp_project || cmp == cmp_reorder_project) { int ins; - /* check if we have two input variables in the right argument*/ + /* check if we have two input variables in the left argument (case: dim join tid)*/ + snprintf(nme, SMALLBUFSIZ, "Y_%d", l); + if(findVariable(mb, nme) >= 0 && isTid(s->op2)) { + /*it is an array related join with a tid + * send the right input to the output + * i.e tids does not do something useful*/ + s->nr = l; + return s->nr; + }/* check if we have two input variables in the right argument (case: tid join bat)*/ snprintf(nme, SMALLBUFSIZ, "Y_%d", r); - if(findVariable(mb, nme) >= 0 && s->op1->type == st_tid) { + if(findVariable(mb, nme) >= 0 && isTid(s->op1)) { /*it is an array related join with a tid * send the right input to the output * i.e tids does not do something useful*/ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list