Changeset: 8152e869f9d9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8152e869f9d9
Modified Files:
sql/backends/monet5/rel_bin.c
sql/test/miscellaneous/Tests/groupby_error.stable.out
Branch: Oct2020
Log Message:
Fix for sqlite query, at rel_bin between case, don't generate const column if
left input cardinality is atomic
diffs (28 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
@@ -1270,7 +1270,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
} else {
if (r2) { /* handle all cases in stmt_uselect,
reducing, non reducing, scalar
etc */
- if (l->nrcols == 0 && left)
+ if (l->nrcols == 0 && left && left->nrcols > 0)
l = stmt_const(be, bin_first_column(be,
left), l);
s = stmt_uselect2(be, l, r, r2,
(comp_type)e->flag, sel, is_anti(e), reduce);
} else {
diff --git a/sql/test/miscellaneous/Tests/groupby_error.stable.out
b/sql/test/miscellaneous/Tests/groupby_error.stable.out
--- a/sql/test/miscellaneous/Tests/groupby_error.stable.out
+++ b/sql/test/miscellaneous/Tests/groupby_error.stable.out
@@ -465,6 +465,12 @@ project (
% bigint # type
% 1 # length
[ 1 ]
+#SELECT CAST(SUM ( + 73 ) * - CASE WHEN NOT ( NOT 27 BETWEEN 15 AND - NULLIF (
- 63, - 28 + + 76 ) ) THEN NULL ELSE + 77 * + 69 END / - CAST ( - 69 AS INTEGER
) AS BIGINT) AS col0;
+% . # table_name
+% col0 # name
+% bigint # type
+% 1 # length
+[ NULL ]
#SELECT DISTINCT CAST(COALESCE ( + 38, - - ( - 70 ) * 52 + + 91 + - 47 ) + +
CAST ( - 54 AS REAL ) / + 68 / + ( - 92 ) * - - CASE WHEN NULL >= NULL THEN
COUNT ( * ) WHEN - COUNT ( * ) IS NULL
#THEN NULL ELSE NULL END * + 28 * - 58 + COUNT ( * ) + + COUNT ( * ) AS
BIGINT);
% .%3 # table_name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list