diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-09 18:53:01 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-09-09 18:53:01 +0300 |
commit | be2b833c426b420073c50564125049e2b4a95e8b (patch) | |
tree | 7d039878d9608833a0ef396fa42e5fc1c09b0fbb /mysql-test/r | |
parent | a37f24b903b282e7fb63261f3b258c6874606e43 (diff) | |
download | mariadb-git-be2b833c426b420073c50564125049e2b4a95e8b.tar.gz |
It is now possible to remove values multiple times from window functions
This can happen with degenerate frame definitions that are always empty.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/win.result | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index 33bf45a6835..d23e8651eb3 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -1189,6 +1189,44 @@ pk c cnt 10 2 0 select pk, c, +sum(c) over (partition by c +order by pk +rows between 1 preceding +and 2 preceding) +as sum +from t1; +pk c sum +1 1 NULL +2 1 NULL +3 1 NULL +4 1 NULL +5 2 NULL +6 2 NULL +7 2 NULL +8 2 NULL +9 2 NULL +10 2 NULL +select +pk, c, +sum(c) over (partition by c +order by pk +rows between 2 following +and 1 following) +as sum +from t1; +pk c sum +1 1 NULL +2 1 NULL +3 1 NULL +4 1 NULL +5 2 NULL +6 2 NULL +7 2 NULL +8 2 NULL +9 2 NULL +10 2 NULL +select +pk, c, count(*) over (partition by c order by pk range between 1 preceding @@ -1788,15 +1826,12 @@ rank() over (order by b) 0 0 drop table t1; -# -# MDEV-9894: Assertion `0' failed in Window_func_runner::setup -# return ER_NOT_SUPPORTED_YET for aggregates that are not yet supported -# as window functions. -# create table t1 (i int); insert into t1 values (1),(2); SELECT MAX(i) OVER (PARTITION BY (i)) FROM t1; -ERROR 42000: This version of MariaDB doesn't yet support 'This aggregate as window function' +MAX(i) OVER (PARTITION BY (i)) +1 +2 drop table t1; # # Check the 0 in ROWS 0 PRECEDING |