Changeset: 6ad525e8e28a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6ad525e8e28a Added Files: sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out Modified Files: sql/test/BugTracker-2019/Tests/All Branch: Nov2019 Log Message:
Added test for bug 6790 diffs (211 lines): diff --git a/sql/test/BugTracker-2019/Tests/All b/sql/test/BugTracker-2019/Tests/All --- a/sql/test/BugTracker-2019/Tests/All +++ b/sql/test/BugTracker-2019/Tests/All @@ -48,3 +48,4 @@ rank-nan.Bug-6780 index-insert-crash.Bug-6781 avg-changes-value-scale.Bug-6783 isaUUID.Bug-6784 +count-distinct.Bug-6790 diff --git a/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql @@ -0,0 +1,19 @@ +START TRANSACTION; +CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER); +CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER); +CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER); +INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10); +INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68); +INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23); + +SELECT COUNT ( DISTINCT + 45 ) AS col2 FROM tab0; +SELECT DISTINCT CAST( - SUM ( DISTINCT 10 ) AS BIGINT) AS col1 FROM tab2; +SELECT DISTINCT CAST(49 * + 78 + + COUNT ( DISTINCT + 5 ) AS BIGINT) AS col0 FROM tab1 AS cor0; +SELECT CAST(72 + - + COUNT ( * ) - - - COUNT ( DISTINCT + ( - 2 ) ) * + + 57 AS BIGINT) FROM tab2; +SELECT DISTINCT - 37, - COUNT ( DISTINCT - + 96 ) col1 FROM tab2; + +SELECT DISTINCT + ( CAST ( NULL AS INTEGER ) ) AS col0, col0 FROM tab0; +SELECT DISTINCT CAST ( NULL AS INTEGER ) - - 95 AS col1, CAST(col2 * + + col1 AS BIGINT) AS col1 FROM tab2 AS cor0; +SELECT DISTINCT + 14 AS col2, + col0 - - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0; +SELECT DISTINCT col1, + col0 col1 FROM tab1; +ROLLBACK; diff --git a/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err @@ -0,0 +1,30 @@ +stderr of test 'count-distinct.Bug-6790` in directory 'sql/test/BugTracker-2019` itself: + + +# 10:33:38 > +# 10:33:38 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=30367" "--set" "mapi_usock=/var/tmp/mtest-125811/.s.monetdb.30367" "--forcemito" "--dbpath=/home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019" "--set" "embedded_c=true" +# 10:33:38 > + +# builtin opt gdk_dbpath = /home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/monetdb5/dbfarm/demo +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_ipv6 = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 30367 +# cmdline opt mapi_usock = /var/tmp/mtest-125811/.s.monetdb.30367 +# cmdline opt gdk_dbpath = /home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019 +# cmdline opt embedded_c = true + +# 10:33:39 > +# 10:33:39 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-125811" "--port=30367" +# 10:33:39 > + + +# 10:33:39 > +# 10:33:39 > "Done." +# 10:33:39 > + diff --git a/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out @@ -0,0 +1,139 @@ +stdout of test 'count-distinct.Bug-6790` in directory 'sql/test/BugTracker-2019` itself: + + +# 10:33:38 > +# 10:33:38 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=30367" "--set" "mapi_usock=/var/tmp/mtest-125811/.s.monetdb.30367" "--forcemito" "--dbpath=/home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019" "--set" "embedded_c=true" +# 10:33:38 > + +# MonetDB 5 server v11.35.2 (hg id: ccacebde5b21) +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers +# Found 15.504 GiB available main-memory of which we use 12.635 GiB +# Copyright (c) 1993 - July 2008 CWI. +# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved +# Visit https://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://localhost.localdomain:30367/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-125811/.s.monetdb.30367 +# MonetDB/GIS module loaded +# SQL catalog created, loading sql scripts once +# loading sql script: 09_like.sql +# loading sql script: 10_math.sql +# loading sql script: 12_url.sql +# loading sql script: 13_date.sql +# loading sql script: 14_inet.sql +# loading sql script: 15_querylog.sql +# loading sql script: 16_tracelog.sql +# loading sql script: 17_temporal.sql +# loading sql script: 18_index.sql +# loading sql script: 20_vacuum.sql +# loading sql script: 21_dependency_views.sql +# loading sql script: 22_clients.sql +# loading sql script: 23_skyserver.sql +# loading sql script: 25_debug.sql +# loading sql script: 26_sysmon.sql +# loading sql script: 27_rejects.sql +# loading sql script: 39_analytics.sql +# loading sql script: 39_analytics_hge.sql +# loading sql script: 40_geom.sql +# loading sql script: 40_json.sql +# loading sql script: 40_json_hge.sql +# loading sql script: 41_md5sum.sql +# loading sql script: 45_uuid.sql +# loading sql script: 46_profiler.sql +# loading sql script: 51_sys_schema_extension.sql +# loading sql script: 60_wlcr.sql +# loading sql script: 61_wlcr.sql +# loading sql script: 72_fits.sql +# loading sql script: 74_netcdf.sql +# loading sql script: 75_lidar.sql +# loading sql script: 75_shp.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_statistics.sql +# loading sql script: 80_udf.sql +# loading sql script: 80_udf_hge.sql +# loading sql script: 85_bam.sql +# loading sql script: 90_generator.sql +# loading sql script: 90_generator_hge.sql +# loading sql script: 99_system.sql +# MonetDB/SQL module loaded + +# 10:33:39 > +# 10:33:39 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-125811" "--port=30367" +# 10:33:39 > + +#START TRANSACTION; +#CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER); +#CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER); +#INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10); +[ 3 ] +#INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68); +[ 3 ] +#INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23); +[ 3 ] +#SELECT COUNT ( DISTINCT + 45 ) AS col2 FROM tab0; +% .L3 # table_name +% col2 # name +% bigint # type +% 1 # length +[ 1 ] +#SELECT DISTINCT CAST( - SUM ( DISTINCT 10 ) AS BIGINT) AS col1 FROM tab2; +% .L3 # table_name +% col1 # name +% bigint # type +% 3 # length +[ -10 ] +#SELECT DISTINCT CAST(49 * + 78 + + COUNT ( DISTINCT + 5 ) AS BIGINT) AS col0 FROM tab1 AS cor0; +% .L3 # table_name +% col0 # name +% bigint # type +% 4 # length +[ 3823 ] +#SELECT CAST(72 + - + COUNT ( * ) - - - COUNT ( DISTINCT + ( - 2 ) ) * + + 57 AS BIGINT) FROM tab2; +% .L4 # table_name +% L4 # name +% bigint # type +% 4 # length +[ 12 ] +#SELECT DISTINCT - 37, - COUNT ( DISTINCT - + 96 ) col1 FROM tab2; +% .L1, .L4 # table_name +% L1, col1 # name +% tinyint, bigint # type +% 3, 2 # length +[ -37, -1 ] +#SELECT DISTINCT + ( CAST ( NULL AS INTEGER ) ) AS col0, col0 FROM tab0; +% .L2, sys.tab0 # table_name +% col0, col0 # name +% int, int # type +% 1, 2 # length +[ NULL, 97 ] +[ NULL, 15 ] +[ NULL, 87 ] +#SELECT DISTINCT CAST ( NULL AS INTEGER ) - - 95 AS col1, CAST(col2 * + + col1 AS BIGINT) AS col1 FROM tab2 AS cor0; +% .L2, sys.L3 # table_name +% col1, col1 # name +% bigint, bigint # type +% 1, 4 # length +[ NULL, 3080 ] +[ NULL, 3886 ] +[ NULL, 1173 ] +#SELECT DISTINCT + 14 AS col2, + col0 - - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0; +% .L1, sys.L3 # table_name +% col2, col2 # name +% tinyint, bigint # type +% 2, 1 # length +[ 14, NULL ] +#SELECT DISTINCT col1, + col0 col1 FROM tab1; +% sys.tab1, sys.L1 # table_name +% col1, col1 # name +% int, int # type +% 2, 2 # length +[ 14, 51 ] +[ 5, 85 ] +[ 47, 91 ] +#ROLLBACK; + +# 10:33:39 > +# 10:33:39 > "Done." +# 10:33:39 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list