Changeset: 84c12c5839dc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=84c12c5839dc Modified Files: sql/test/analytics/Tests/analytics10.sql sql/test/analytics/Tests/analytics10.stable.err sql/test/analytics/Tests/analytics10.stable.out Branch: grouping-analytics Log Message:
Approved output diffs (134 lines): diff --git a/sql/test/analytics/Tests/analytics10.sql b/sql/test/analytics/Tests/analytics10.sql --- a/sql/test/analytics/Tests/analytics10.sql +++ b/sql/test/analytics/Tests/analytics10.sql @@ -1,4 +1,4 @@ -CREATE TABLE tbl_ProductSales (ColID int, Product_Category clob, Product_Name clob, TotalSales int); +CREATE TABLE tbl_ProductSales (ColID int, Product_Category varchar(64), Product_Name varchar(64), TotalSales int); INSERT INTO tbl_ProductSales VALUES (1,'Game','Mobo Game',200),(2,'Game','PKO Game',400),(3,'Fashion','Shirt',500),(4,'Fashion','Shorts',100); SELECT diff --git a/sql/test/analytics/Tests/analytics10.stable.err b/sql/test/analytics/Tests/analytics10.stable.err --- a/sql/test/analytics/Tests/analytics10.stable.err +++ b/sql/test/analytics/Tests/analytics10.stable.err @@ -33,6 +33,16 @@ ERROR = !syntax error, unexpected ')' in !from tbl_productsales !" CODE = 42000 +MAPI = (monetdb) /var/tmp/mtest-2432/.s.monetdb.39687 +QUERY = SELECT + CAST(SUM(TotalSales) as BIGINT) AS TotalSales + FROM tbl_ProductSales + GROUP BY CUBE(); --error, cube must have at least one column +ERROR = !syntax error, unexpected ')' in: "select + ! cast(sum(totalsales) as bigint) as totalsales + !from tbl_productsales + !" +CODE = 42000 # 11:30:14 > # 11:30:14 > "Done." diff --git a/sql/test/analytics/Tests/analytics10.stable.out b/sql/test/analytics/Tests/analytics10.stable.out --- a/sql/test/analytics/Tests/analytics10.stable.out +++ b/sql/test/analytics/Tests/analytics10.stable.out @@ -41,7 +41,7 @@ stdout of test 'analytics10` in director #GROUP BY ROLLUP(Product_Category); % .tbl_productsales, .L3 # table_name % product_category, totalsales # name -% clob, bigint # type +% varchar, bigint # type % 7, 4 # length [ "Game", 600 ] [ "Fashion", 600 ] @@ -52,7 +52,7 @@ stdout of test 'analytics10` in director #GROUP BY ROLLUP(Product_Name); % .tbl_productsales, .L3 # table_name % product_name, totalsales # name -% clob, bigint # type +% varchar, bigint # type % 9, 4 # length [ "Mobo Game", 200 ] [ "PKO Game", 400 ] @@ -65,7 +65,7 @@ stdout of test 'analytics10` in director #GROUP BY ROLLUP(Product_Category, Product_Name); % .tbl_productsales, .tbl_productsales, .L3 # table_name % product_category, product_name, totalsales # name -% clob, clob, bigint # type +% varchar, varchar, bigint # type % 7, 9, 4 # length [ "Game", "Mobo Game", 200 ] [ "Game", "PKO Game", 400 ] @@ -80,12 +80,73 @@ stdout of test 'analytics10` in director #GROUP BY ROLLUP(Product_Category, Product_Name) HAVING SUM(TotalSales) > 400; % .tbl_productsales, .tbl_productsales, .L3 # table_name % product_category, product_name, totalsales # name -% clob, clob, bigint # type +% varchar, varchar, bigint # type % 7, 5, 4 # length [ "Fashion", "Shirt", 500 ] [ "Game", NULL, 600 ] [ "Fashion", NULL, 600 ] [ NULL, NULL, 1200 ] +#SELECT +# Product_Category, CAST(SUM(TotalSales) as BIGINT) AS TotalSales FROM tbl_ProductSales +#GROUP BY CUBE(Product_Category); +% .tbl_productsales, .L3 # table_name +% product_category, totalsales # name +% varchar, bigint # type +% 7, 4 # length +[ NULL, 1200 ] +[ "Game", 600 ] +[ "Fashion", 600 ] +#SELECT +# Product_Name, CAST(SUM(TotalSales) as BIGINT) AS TotalSales +#FROM tbl_ProductSales +#GROUP BY CUBE(Product_Name); +% .tbl_productsales, .L3 # table_name +% product_name, totalsales # name +% varchar, bigint # type +% 9, 4 # length +[ NULL, 1200 ] +[ "Mobo Game", 200 ] +[ "PKO Game", 400 ] +[ "Shirt", 500 ] +[ "Shorts", 100 ] +#SELECT +# Product_Category, Product_Name, CAST(SUM(TotalSales) as BIGINT) AS TotalSales +#FROM tbl_ProductSales +#GROUP BY CUBE(Product_Category, Product_Name); +% .tbl_productsales, .tbl_productsales, .L3 # table_name +% product_category, product_name, totalsales # name +% varchar, varchar, bigint # type +% 7, 9, 4 # length +[ NULL, NULL, 1200 ] +[ "Game", NULL, 600 ] +[ "Fashion", NULL, 600 ] +[ NULL, "Mobo Game", 200 ] +[ NULL, "PKO Game", 400 ] +[ NULL, "Shirt", 500 ] +[ NULL, "Shorts", 100 ] +[ "Game", "Mobo Game", 200 ] +[ "Game", "PKO Game", 400 ] +[ "Fashion", "Shirt", 500 ] +[ "Fashion", "Shorts", 100 ] +#SELECT +# Product_Category, Product_Name, CAST(SUM(TotalSales) as BIGINT) AS TotalSales +#FROM tbl_ProductSales +#GROUP BY CUBE(Product_Category, Product_Name) ORDER BY Product_Category, Product_Name; +% .tbl_productsales, .tbl_productsales, .L3 # table_name +% product_category, product_name, totalsales # name +% varchar, varchar, bigint # type +% 7, 9, 4 # length +[ NULL, NULL, 1200 ] +[ NULL, "Mobo Game", 200 ] +[ NULL, "PKO Game", 400 ] +[ NULL, "Shirt", 500 ] +[ NULL, "Shorts", 100 ] +[ "Fashion", NULL, 600 ] +[ "Fashion", "Shirt", 500 ] +[ "Fashion", "Shorts", 100 ] +[ "Game", NULL, 600 ] +[ "Game", "Mobo Game", 200 ] +[ "Game", "PKO Game", 400 ] #DROP TABLE tbl_ProductSales; # 11:30:14 > _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list