Changeset: b59a8a671eb8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b59a8a671eb8
Branch: optimizer-testing
Log Message:
merge with default
diffs (65 lines):
diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c
--- a/sql/server/rel_optimize_proj.c
+++ b/sql/server/rel_optimize_proj.c
@@ -1723,17 +1723,13 @@ rel_groupby_cse(visitor *v, sql_rel *rel
sql_exp *e2_in_exps = (e2->alias.rname
== e2->l && e2->alias.name == e2->r) ?
exps_bind_column2(rel->exps,
e2->l, e2->r, NULL) :
exps_bind_column(rel->exps,
e2->alias.name, NULL, NULL, 0);
- if (!e2_in_exps)
- /* TODO: should we ever be
here? */
- continue;
+ assert(e2_in_exps);
/* same as e2 */
sql_exp *e1_in_exps = (e1->alias.rname
== e1->l && e1->alias.name == e1->r) ?
exps_bind_column2(rel->exps,
e1->l, e1->r, NULL) :
exps_bind_column(rel->exps,
e1->alias.name, NULL, NULL, 0);
- if (!e1_in_exps)
- /* TODO: should we ever be
here? */
- continue;
+ assert(e1_in_exps);
/* write e2 as an e1 alias since the
expressions are the same */
sql_exp* e2_as_e1_alias =
exp_copy(v->sql, e1_in_exps);
diff --git
a/sql/test/BugTracker-2015/Tests/crash_in_reduce_groupby.Bug-3818.test
b/sql/test/BugTracker-2015/Tests/crash_in_reduce_groupby.Bug-3818.test
--- a/sql/test/BugTracker-2015/Tests/crash_in_reduce_groupby.Bug-3818.test
+++ b/sql/test/BugTracker-2015/Tests/crash_in_reduce_groupby.Bug-3818.test
@@ -27,10 +27,8 @@ GROUP BY cods, elrik, ether, jaelen, sor
----
project (
| group by (
-| | project (
-| | | table("sys"."t2a") [ "t2a"."tib0" NOT NULL UNIQUE ]
-| | ) [ "t2a"."tib0" NOT NULL UNIQUE, tinyint(8) "0" as "elrik", tinyint(8)
"0" as "ether", tinyint(8) "0" as "jaelen", tinyint(8) "0" as "sora" ]
-| ) [ tinyint(8) "0" as "cods" ] [ "cods" NOT NULL, "elrik" NOT NULL, "ether"
NOT NULL, "jaelen" NOT NULL, "sora" NOT NULL, "sys"."min" no nil ("t2a"."tib0"
NOT NULL UNIQUE) NOT NULL as "%1"."%1" ]
+| | table("sys"."t2a") [ "t2a"."tib0" NOT NULL UNIQUE ]
+| ) [ tinyint(8) "0" as "cods" ] [ "cods" NOT NULL, "cods" NOT NULL as
"elrik", "cods" NOT NULL as "ether", "cods" NOT NULL as "jaelen", "cods" NOT
NULL as "sora", "sys"."min" no nil ("t2a"."tib0" NOT NULL UNIQUE) NOT NULL as
"%1"."%1" ]
) [ "cods" NOT NULL UNIQUE, "elrik" NOT NULL, "ether" NOT NULL, "jaelen" NOT
NULL, "sora" NOT NULL, "%1"."%1" NOT NULL ]
statement ok
diff --git a/sql/test/miscellaneous/Tests/groupby_error.test
b/sql/test/miscellaneous/Tests/groupby_error.test
--- a/sql/test/miscellaneous/Tests/groupby_error.test
+++ b/sql/test/miscellaneous/Tests/groupby_error.test
@@ -405,7 +405,7 @@ project (
| | | table("sys"."tab1") [ "tab1"."part" UNIQUE as "myalias0"."part",
"tab1"."tet" UNIQUE as "myalias0"."tet" ],
| | | table("sys"."tab2") [ "tab2"."myk" as "myalias1"."myk", "tab2"."ups"
UNIQUE as "myalias1"."ups" ]
| | ) [ ("myalias0"."part" UNIQUE) = ("myalias1"."myk") ]
-| ) [ "myalias1"."ups", "myalias0"."part", "myalias0"."tet" as "track" ] [
"myalias0"."part", "track", "myalias0"."tet", "sys"."count"() NOT NULL as
"%1"."%1" ]
+| ) [ "myalias1"."ups", "myalias0"."part", "myalias0"."tet" as "track" ] [
"myalias0"."part", "track", "track" as "myalias0"."tet", "sys"."count"() NOT
NULL as "%1"."%1" ]
) [ "myalias0"."part" as "part", "myalias0"."tet" as "tet", "%1"."%1" NOT NULL
as "mycount", "track" ]
query IIII rowsort
diff --git a/sql/test/miscellaneous/Tests/simple_selects.test
b/sql/test/miscellaneous/Tests/simple_selects.test
--- a/sql/test/miscellaneous/Tests/simple_selects.test
+++ b/sql/test/miscellaneous/Tests/simple_selects.test
@@ -912,8 +912,8 @@ plan SELECT x AS x, x AS x1 FROM (VALUES
----
project (
| group by (
-| | [ [ tinyint(2) "1", tinyint(2) "2", tinyint(2) "3" ] as "x"."x", "x"."x"
NOT NULL as "x1" ]
-| ) [ "x"."x" NOT NULL ] [ "x"."x" NOT NULL, "x1" NOT NULL ]
+| | [ [ tinyint(2) "1", tinyint(2) "2", tinyint(2) "3" ] as "x"."x" ]
+| ) [ "x"."x" NOT NULL ] [ "x"."x" NOT NULL, "x"."x" NOT NULL as "x1" ]
) [ "x"."x" NOT NULL UNIQUE as "x", "x1" NOT NULL ]
query II rowsort
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]