Changeset: 7be034cc1886 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7be034cc1886
Modified Files:
        sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.sql
        sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.stable.out
Branch: default
Log Message:

On some platforms we got error:
QUERY = select count(*), 1 from (
            (select this_column from table_one)
            intersect
            (select this_column from table_two)
        ) as "existing"
        union all
        select count(*), 0 from (
            (select this_column from table_one)
            except
            (select this_column from table_two)
        ) as "missing";
ERROR = !inputs not the same size.

Apparently the union detects different output signatures of the first and 
second query.
This occurs in default branch on platforms:
 mac-mini       Cla-Dar-i64 (without assert propcheck)
 lab05          GNU-Fed-i64 (without assert propcheck)
 solaris        Sol-Sol-i64
 zonnestraal    GNU-Sol-s32
 win2012        Int-Win-i32
 win2012        Mic-Win-i32
 win2012        Mic-Win-i64
 lab03          Int-Win-i32
 lab03          Mic-Win-i32
But strangely not on:
 mac-mini       Cla-Dar-i64 (with assert propcheck)
 lab05          GNU-Fed-i64 (with assert / propcheck / not_int128)
 win2012        Int-Win-i64
 lab03          Int-Win-i64
 lab03          Mic-Win-i64

To get a stable output I added explicit cast to bigint for the count(*) column 
in this query.


Once this works on default, we can repeat this patch on Dec2016 branch where it 
occurs on platforms:
 zonnestraal    GNU-Sol-s32
 win2012        Int-Win-i32
 lab03          Int-Win-i32
 lab03          Int-Win-i64
But strangely not on:
 win2012        Int-Win-i64


diffs (46 lines):

diff --git a/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.sql 
b/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.sql
--- a/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.sql
+++ b/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.sql
@@ -45,13 +45,13 @@ SELECT COUNT(*) AS count, (CASE WHEN t2.
  GROUP BY new_column;
 
 
-select count(*), 1 from (
+select cast(count(*) as bigint) as count, 1 from (
     (select this_column from table_one)
     intersect
     (select this_column from table_two)
 ) as "existing"
 union all
-select count(*), 0 from (
+select cast(count(*) as bigint) as count, 0 from (
     (select this_column from table_one)
     except
     (select this_column from table_two)
diff --git a/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.stable.out 
b/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.stable.out
--- a/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.stable.out
+++ b/sql/test/BugTracker-2016/Tests/select-in-from.Bug-6121.stable.out
@@ -178,19 +178,19 @@ Ready.
 % 1,   1 # length
 [ 2,   1       ]
 [ 3,   0       ]
-#select count(*), 1 from (
+#select cast(count(*) as bigint) as count, 1 from (
 #    (select this_column from table_one)
 #    intersect
 #    (select this_column from table_two)
 #) as "existing"
 #union all
-#select count(*), 0 from (
+#select cast(count(*) as bigint) as count, 0 from (
 #    (select this_column from table_one)
 #    except
 #    (select this_column from table_two)
 #) as "missing";
-% .L34,        .L34 # table_name
-% L11, L14 # name
+% .L36,        .L36 # table_name
+% count,       L15 # name
 % bigint,      tinyint # type
 % 1,   1 # length
 [ 2,   1       ]
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to