diff --git a/src/Parsers/ExpressionElementParsers.cpp b/src/Parsers/ExpressionElementParsers.cpp index a9b38b45c1c4a415e26df1cf6e12ed6c88a9f9de..de327e3f0f390f25a513810f4c8a383b65562e7a 100644 --- a/src/Parsers/ExpressionElementParsers.cpp +++ b/src/Parsers/ExpressionElementParsers.cpp @@ -45,6 +45,7 @@ namespace DB namespace ErrorCodes { + extern const int BAD_ARGUMENTS; extern const int SYNTAX_ERROR; extern const int LOGICAL_ERROR; extern const int NOT_IMPLEMENTED; diff --git a/tests/queries/0_stateless/01591_window_functions.reference b/tests/queries/0_stateless/01591_window_functions.reference index 8c0ef9ecaa63cdee808217826008414d92ab547b..7e286f753e507c9d08dc03b3cd94a070bf8c9191 100644 --- a/tests/queries/0_stateless/01591_window_functions.reference +++ b/tests/queries/0_stateless/01591_window_functions.reference @@ -516,43 +516,45 @@ settings max_block_size = 2; 27 27 29 29 27 27 29 29 30 30 30 30 --- CURRENT ROW and offset for ROWS frame start +-- ROWS offset frame start select number, p, count(*) over (partition by p order by number rows between 1 preceding and unbounded following), + count(*) over (partition by p order by number + rows between current row and unbounded following), count(*) over (partition by p order by number rows between 1 following and unbounded following) from (select number, intDiv(number, 5) p from numbers(31)) order by p, number settings max_block_size = 2; -0 0 5 4 -1 0 5 3 -2 0 4 2 -3 0 3 1 -4 0 2 0 -5 1 5 4 -6 1 5 3 -7 1 4 2 -8 1 3 1 -9 1 2 0 -10 2 5 4 -11 2 5 3 -12 2 4 2 -13 2 3 1 -14 2 2 0 -15 3 5 4 -16 3 5 3 -17 3 4 2 -18 3 3 1 -19 3 2 0 -20 4 5 4 -21 4 5 3 -22 4 4 2 -23 4 3 1 -24 4 2 0 -25 5 5 4 -26 5 5 3 -27 5 4 2 -28 5 3 1 -29 5 2 0 -30 6 1 0 +0 0 5 5 4 +1 0 5 4 3 +2 0 4 3 2 +3 0 3 2 1 +4 0 2 1 0 +5 1 5 5 4 +6 1 5 4 3 +7 1 4 3 2 +8 1 3 2 1 +9 1 2 1 0 +10 2 5 5 4 +11 2 5 4 3 +12 2 4 3 2 +13 2 3 2 1 +14 2 2 1 0 +15 3 5 5 4 +16 3 5 4 3 +17 3 4 3 2 +18 3 3 2 1 +19 3 2 1 0 +20 4 5 5 4 +21 4 5 4 3 +22 4 4 3 2 +23 4 3 2 1 +24 4 2 1 0 +25 5 5 5 4 +26 5 5 4 3 +27 5 4 3 2 +28 5 3 2 1 +29 5 2 1 0 +30 6 1 1 0