Changeset: 2b4061fb3a10 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b4061fb3a10 Modified Files: sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/test/remote/Tests/ssbm.stable.out sql/test/remote/Tests/ssbm.stable.out.int128 Branch: sq2default Log Message:
Call stmt_list when the input expression has CARD_ATOM diffs (215 lines): diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -505,7 +505,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l /* handle table returning functions */ if (l->type == e_psm && l->flag & PSM_REL) { stmt *lst = r->op1; - if (r->type == st_table && lst->nrcols == 0 && lst->key && e->card > CARD_ATOM) { + if (r->type == st_table && lst->nrcols == 0 && lst->key) { node *n; list *l = sa_list(sql->sa); @@ -1395,7 +1395,8 @@ rel2bin_basetable(backend *be, sql_rel * if (!t && c) t = c->t; - dels = stmt_tid(be, t, rel->flag == REL_PARTITION); + + dels = stmt_tid(be, t, rel->flag == REL_PARTITION); /* add aliases */ assert(rel->exps); @@ -1411,7 +1412,7 @@ rel2bin_basetable(backend *be, sql_rel * const char *cname = cexp->r; list *l = sa_list(sql->sa); - c = find_sql_column(t, cname); + c = find_sql_column(t, cname); s = stmt_col(be, c, dels); append(l, s); if (exps->h->next) { 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 @@ -547,9 +547,9 @@ static int /* catch exceptions */ p = newCatchStmt(curBlk,"MALexception"); - p = newExitStmt(curBlk,"MALexception"); - p = newCatchStmt(curBlk,"SQLexception"); - p = newExitStmt(curBlk,"SQLexception"); + p = newExitStmt(curBlk,"MALexception"); + p = newCatchStmt(curBlk,"SQLexception"); + p = newExitStmt(curBlk,"SQLexception"); /* remote.disconnect(q); */ p = newStmt(curBlk, remoteRef, disconnectRef); p = pushArgument(curBlk, p, q); 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 @@ -575,7 +575,7 @@ stmt_bat(backend *be, sql_column *c, int s->nr = l[c->colnr+1]; return s; } - q = newStmt(mb, sqlRef, bindRef); + q = newStmt(mb, sqlRef, bindRef); if (q == NULL) return NULL; if (access == RD_UPD_ID) { diff --git a/sql/test/remote/Tests/ssbm.stable.out b/sql/test/remote/Tests/ssbm.stable.out --- a/sql/test/remote/Tests/ssbm.stable.out +++ b/sql/test/remote/Tests/ssbm.stable.out @@ -287,7 +287,7 @@ 356 # and d_year >= 1992 and d_year <= 1997 # group by c_nation, s_nation, d_year # order by d_year asc, revenue desc; -% .customer, .supplier, .dwdate, .L6 # table_name +% .customer, .supplier, .dwdate, .%1 # table_name % c_nation, s_nation, d_year, revenue # name % clob, clob, int, bigint # type % 9, 9, 4, 9 # length @@ -510,7 +510,7 @@ 356 # and (p_mfgr = 'MFGR#1' or p_mfgr = 'MFGR#2') # group by d_year, s_nation, p_category # order by d_year, s_nation, p_category; -% .dwdate, .supplier, .part, .L6 # table_name +% .dwdate, .supplier, .part, .%1 # table_name % d_year, s_nation, p_category, profit1 # name % int, clob, clob, bigint # type % 4, 13, 7, 8 # length @@ -607,7 +607,7 @@ 356 # and p_category = 'MFGR#14' # group by d_year, s_city, p_brand1 # order by d_year, s_city, p_brand1; -% .dwdate, .supplier, .part, .L6 # table_name +% .dwdate, .supplier, .part, .%1 # table_name % d_year, s_city, p_brand1, profit1 # name % int, clob, clob, bigint # type % 4, 10, 9, 7 # length diff --git a/sql/test/remote/Tests/ssbm.stable.out.int128 b/sql/test/remote/Tests/ssbm.stable.out.int128 --- a/sql/test/remote/Tests/ssbm.stable.out.int128 +++ b/sql/test/remote/Tests/ssbm.stable.out.int128 @@ -21,7 +21,7 @@ 356 # and d_year = 1993 # and lo_discount between 1 and 3 # and lo_quantity < 25; -% .L4 # table_name +% .%1 # table_name % revenue # name % hugeint # type % 10 # length @@ -38,7 +38,7 @@ 356 # and d_yearmonthnum = 199401 # and lo_discount between 4 and 6 # and lo_quantity between 26 and 35; -% .L4 # table_name +% .%1 # table_name % revenue # name % hugeint # type % 9 # length @@ -55,7 +55,7 @@ 356 # and d_weeknuminyear = 6 and d_year = 1994 # and lo_discount between 5 and 7 # and lo_quantity between 36 and 40; -% .L4 # table_name +% .%1 # table_name % revenue # name % hugeint # type % 9 # length @@ -75,8 +75,8 @@ 356 # and s_region = 'AMERICA' # group by d_year, p_brand1 # order by d_year, p_brand1; -% .L2, .dwdate, .part # table_name -% L2, d_year, p_brand1 # name +% .%1, .dwdate, .part # table_name +% %1, d_year, p_brand1 # name % hugeint, int, clob # type % 8, 4, 9 # length [ 35741623, 1992, "MFGR#1211" ] @@ -251,8 +251,8 @@ 356 # and s_region = 'ASIA' # group by d_year, p_brand1 # order by d_year, p_brand1; -% .L2, .dwdate, .part # table_name -% L2, d_year, p_brand1 # name +% .%1, .dwdate, .part # table_name +% %1, d_year, p_brand1 # name % hugeint, int, clob # type % 8, 4, 9 # length [ 10306232, 1992, "MFGR#2221" ] @@ -317,8 +317,8 @@ 356 # and s_region = 'EUROPE' # group by d_year, p_brand1 # order by d_year, p_brand1; -% .L2, .dwdate, .part # table_name -% L2, d_year, p_brand1 # name +% .%1, .dwdate, .part # table_name +% %1, d_year, p_brand1 # name % hugeint, int, clob # type % 8, 4, 9 # length [ 2535744, 1992, "MFGR#2221" ] @@ -344,7 +344,7 @@ 356 # and d_year >= 1992 and d_year <= 1997 # group by c_nation, s_nation, d_year # order by d_year asc, revenue desc; -% .customer, .supplier, .dwdate, .L6 # table_name +% .customer, .supplier, .dwdate, .%1 # table_name % c_nation, s_nation, d_year, revenue # name % clob, clob, int, hugeint # type % 9, 9, 4, 9 # length @@ -514,7 +514,7 @@ 356 # and d_year >= 1992 and d_year <= 1997 # group by c_city, s_city, d_year # order by d_year asc, revenue desc; -% .customer, .supplier, .dwdate, .L6 # table_name +% .customer, .supplier, .dwdate, .%1 # table_name % c_city, s_city, d_year, revenue # name % clob, clob, int, hugeint # type % 0, 0, 1, 1 # length @@ -536,7 +536,7 @@ 356 # and d_year >= 1992 and d_year <= 1997 # group by c_city, s_city, d_year # order by d_year asc, revenue desc; -% .customer, .supplier, .dwdate, .L6 # table_name +% .customer, .supplier, .dwdate, .%1 # table_name % c_city, s_city, d_year, revenue # name % clob, clob, int, hugeint # type % 0, 0, 1, 1 # length @@ -558,7 +558,7 @@ 356 # and d_yearmonth = 'Dec1997' # group by c_city, s_city, d_year # order by d_year asc, revenue desc; -% .customer, .supplier, .dwdate, .L6 # table_name +% .customer, .supplier, .dwdate, .%1 # table_name % c_city, s_city, d_year, revenue # name % clob, clob, int, hugeint # type % 0, 0, 1, 1 # length @@ -579,7 +579,7 @@ 356 # and (p_mfgr = 'MFGR#1' or p_mfgr = 'MFGR#2') # group by d_year, c_nation # order by d_year, c_nation; -% .dwdate, .customer, .L5 # table_name +% .dwdate, .customer, .%1 # table_name % d_year, c_nation, profit1 # name % int, clob, bigint # type % 4, 9, 9 # length @@ -629,7 +629,7 @@ 356 # and (p_mfgr = 'MFGR#1' or p_mfgr = 'MFGR#2') # group by d_year, s_nation, p_category # order by d_year, s_nation, p_category; -% .dwdate, .supplier, .part, .L6 # table_name +% .dwdate, .supplier, .part, .%1 # table_name % d_year, s_nation, p_category, profit1 # name % int, clob, clob, bigint # type % 4, 13, 7, 8 # length @@ -727,7 +727,7 @@ 356 # and p_category = 'MFGR#14' # group by d_year, s_city, p_brand1 # order by d_year, s_city, p_brand1; -% .dwdate, .supplier, .part, .L6 # table_name +% .dwdate, .supplier, .part, .%1 # table_name % d_year, s_city, p_brand1, profit1 # name % int, clob, clob, bigint # type % 4, 10, 9, 7 # length _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list