Changeset: ae88a78a547d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ae88a78a547d
Modified Files:
        sql/test/analytics/Tests/analytics02.test
        sql/test/analytics/Tests/analytics08.test
        sql/test/analytics/Tests/analytics11.test
        sql/test/analytics/Tests/analytics13.test
        sql/test/analytics/Tests/analytics14.test
        sql/test/analytics/Tests/analytics15.test
Branch: Aug2024
Log Message:

order results in analytics tests


diffs (241 lines):

diff --git a/sql/test/analytics/Tests/analytics02.test 
b/sql/test/analytics/Tests/analytics02.test
--- a/sql/test/analytics/Tests/analytics02.test
+++ b/sql/test/analytics/Tests/analytics02.test
@@ -1247,7 +1247,7 @@ 6
 7
 
 query I nosort
-select count(aa) over (partition by bb order by bb rows between 5 preceding 
and 0 following) from stressme
+select count(aa) over (partition by bb order by bb, aa rows between 5 
preceding and 0 following) from stressme
 ----
 1
 2
diff --git a/sql/test/analytics/Tests/analytics08.test 
b/sql/test/analytics/Tests/analytics08.test
--- a/sql/test/analytics/Tests/analytics08.test
+++ b/sql/test/analytics/Tests/analytics08.test
@@ -8,42 +8,42 @@ statement ok
 start transaction
 
 query I nosort
-select first_value(aa) over (w order by bb) from analytics window w as 
(partition by bb)
+select first_value(aa) over (w order by bb, aa) from analytics window w as 
(partition by bb)
 ----
-3
-3
-3
+2
+2
+2
 NULL
 NULL
 NULL
-15
-15
-15
+5
+5
+5
 NULL
 
 query II nosort
-select first_value(aa) over (w1 order by bb),
-       last_value(aa) over (w2 order by bb) from analytics window w1 as (w2), 
w2 as (), w3 as (w1)
+select first_value(aa) over (w1 order by bb, aa),
+       last_value(aa) over (w2 order by bb, aa) from analytics window w1 as 
(w2), w2 as (), w3 as (w1)
 ----
+2
+2
+2
 3
+2
 4
-3
-4
+2
+NULL
+2
 3
-4
-3
+2
 8
-3
-8
-3
-8
-3
+2
+5
+2
 6
-3
-6
-3
-6
-3
+2
+15
+2
 NULL
 
 query III nosort
diff --git a/sql/test/analytics/Tests/analytics11.test 
b/sql/test/analytics/Tests/analytics11.test
--- a/sql/test/analytics/Tests/analytics11.test
+++ b/sql/test/analytics/Tests/analytics11.test
@@ -337,6 +337,7 @@ SELECT
     GROUPING(Product_Category), AVG(SUM(TotalSales)) OVER (ROWS UNBOUNDED 
PRECEDING), RANK() OVER (PARTITION BY SUM(TotalSales))
 FROM tbl_ProductSales
 GROUP BY GROUPING SETS((Product_Category), (Product_Name), (Product_Category, 
Product_Name), ())
+ORDER BY Product_Category, Product_Name
 ----
 0
 100.000
diff --git a/sql/test/analytics/Tests/analytics13.test 
b/sql/test/analytics/Tests/analytics13.test
--- a/sql/test/analytics/Tests/analytics13.test
+++ b/sql/test/analytics/Tests/analytics13.test
@@ -338,7 +338,7 @@ NULL
 
 query I nosort
 SELECT
-    LAST_VALUE(col5) OVER (PARTITION BY AVG(col8) ORDER BY SUM(col7) NULLS 
FIRST)
+    LAST_VALUE(col5) OVER (PARTITION BY AVG(col8) ORDER BY SUM(col7), col5 
NULLS FIRST)
 FROM another_T
 GROUP BY CUBE(col1, col2, col5, col8)
 ----
@@ -349,7 +349,14 @@ NULL
 NULL
 NULL
 NULL
-NULL
+5
+5
+5
+5
+5
+5
+5
+5
 NULL
 NULL
 NULL
@@ -357,6 +364,14 @@ NULL
 NULL
 NULL
 NULL
+55
+55
+55
+55
+55
+55
+55
+55
 NULL
 NULL
 NULL
@@ -364,6 +379,14 @@ NULL
 NULL
 NULL
 NULL
+555
+555
+555
+555
+555
+555
+555
+555
 NULL
 NULL
 NULL
@@ -372,29 +395,6 @@ NULL
 NULL
 NULL
 NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-NULL
-5555
-5555
-5555
-5555
-5555
-5555
-5555
 5555
 5555
 5555
diff --git a/sql/test/analytics/Tests/analytics14.test 
b/sql/test/analytics/Tests/analytics14.test
--- a/sql/test/analytics/Tests/analytics14.test
+++ b/sql/test/analytics/Tests/analytics14.test
@@ -526,7 +526,7 @@ NULL
 
 query RR nosort
 select stddev_samp(aa) over (rows 2 preceding),
-       stddev_samp(aa) over (partition by bb order by bb rows 2 preceding) 
from analytics
+       stddev_samp(aa) over (partition by bb order by bb, aa rows 2 preceding) 
from analytics
 ----
 NULL
 NULL
@@ -534,19 +534,19 @@ 0.707
 0.707
 1.000
 1.000
-1.414
+0.707
 NULL
 0.707
 NULL
 3.536
 3.536
-6.028
+2.517
 NULL
-5.132
-7.071
+1.528
+0.707
 5.508
 5.508
-0.707
+6.364
 NULL
 
 query RRRR nosort
diff --git a/sql/test/analytics/Tests/analytics15.test 
b/sql/test/analytics/Tests/analytics15.test
--- a/sql/test/analytics/Tests/analytics15.test
+++ b/sql/test/analytics/Tests/analytics15.test
@@ -1357,7 +1357,7 @@ NULL
 
 query RR nosort
 select covar_samp(bb, aa) over (rows 2 preceding),
-       covar_samp(10, bb) over (partition by bb order by bb rows 2 preceding) 
from analytics
+       covar_samp(10, bb) over (partition by bb order by bb, aa rows 2 
preceding) from analytics
 ----
 NULL
 NULL
@@ -1371,9 +1371,9 @@ NULL
 0.000
 0.000
 0.000
-3.167
+-0.167
 NULL
-0.667
+-0.833
 0.000
 0.000
 0.000
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to