diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-07-11 18:59:51 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2023-07-11 18:59:51 +0300 |
commit | 0ac6cfd62e12fe842b8c0daf621ecf17255f0b17 (patch) | |
tree | b8b5b96a64a30ae73d594d0c3d16bbe221a93214 | |
parent | 59d997e1ed77db8e28b9cf50be9f0800e7d240cf (diff) | |
download | ydb-0ac6cfd62e12fe842b8c0daf621ecf17255f0b17.tar.gz |
KIKIMR-18692:recanonization
2 files changed, 20 insertions, 14 deletions
diff --git a/ydb/tests/functional/suite_tests/canondata/test_stream_query.TestStreamQuery.test_sql_suite_results-window.test_/window.test.out b/ydb/tests/functional/suite_tests/canondata/test_stream_query.TestStreamQuery.test_sql_suite_results-window.test_/window.test.out index a2723e11f9..9162181285 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_stream_query.TestStreamQuery.test_sql_suite_results-window.test_/window.test.out +++ b/ydb/tests/functional/suite_tests/canondata/test_stream_query.TestStreamQuery.test_sql_suite_results-window.test_/window.test.out @@ -596,7 +596,8 @@ pragma SimpleColumns; select first_value(max(x)) over w, y from (select unique1 as x, ten+four as y from tenk1) group by y - window w AS (); + window w AS () + order by y desc; column0 | y ---------+---- @@ -617,20 +618,21 @@ SELECT four, ten, sum(ten) over w, last_value(ten) over w FROM (select distinct ten, four from tenk1) -WINDOW w AS (partition by four order by ten); +WINDOW w AS (partition by four order by ten) +ORDER BY four; four | ten | column2 | column3 ------+-----+---------+--------- - 1 | 1 | 1 | 1 - 1 | 3 | 4 | 3 - 1 | 5 | 9 | 5 - 1 | 7 | 16 | 7 - 1 | 9 | 25 | 9 0 | 0 | 0 | 0 0 | 2 | 2 | 2 0 | 4 | 6 | 4 0 | 6 | 12 | 6 0 | 8 | 20 | 8 + 1 | 1 | 1 | 1 + 1 | 3 | 4 | 3 + 1 | 5 | 9 | 5 + 1 | 7 | 16 | 7 + 1 | 9 | 25 | 9 2 | 0 | 0 | 0 2 | 2 | 2 | 2 2 | 4 | 6 | 4 @@ -652,19 +654,20 @@ SELECT four, ten/4 as two, last_value(ten/4) over w FROM (select distinct ten, four from tenk1) WINDOW w AS (partition by four order by ten/4 rows between unbounded preceding and current row) +ORDER BY four; four | two | column2 | column3 ------+-----+---------+--------- - 1 | 0 | 0 | 0 - 1 | 0 | 0 | 0 - 1 | 1 | 1 | 1 - 1 | 1 | 2 | 1 - 1 | 2 | 4 | 2 0 | 0 | 0 | 0 0 | 0 | 0 | 0 0 | 1 | 1 | 1 0 | 1 | 2 | 1 0 | 2 | 4 | 2 + 1 | 0 | 0 | 0 + 1 | 0 | 0 | 0 + 1 | 1 | 1 | 1 + 1 | 1 | 2 | 1 + 1 | 2 | 4 | 2 2 | 0 | 0 | 0 2 | 0 | 0 | 0 2 | 1 | 1 | 1 diff --git a/ydb/tests/functional/suite_tests/stream_query/window.test b/ydb/tests/functional/suite_tests/stream_query/window.test index 9704855ef8..f9309f2793 100644 --- a/ydb/tests/functional/suite_tests/stream_query/window.test +++ b/ydb/tests/functional/suite_tests/stream_query/window.test @@ -230,7 +230,8 @@ statement stream query select first_value(max(x)) over w, y from (select unique1 as x, ten+four as y from tenk1) group by y - window w AS (); + window w AS () + order by y desc; -- test non-default frame specifications statement stream query @@ -238,7 +239,8 @@ SELECT four, ten, sum(ten) over w, last_value(ten) over w FROM (select distinct ten, four from tenk1) -WINDOW w AS (partition by four order by ten); +WINDOW w AS (partition by four order by ten) +ORDER BY four; statement error SELECT four, ten, @@ -267,6 +269,7 @@ SELECT four, ten/4 as two, last_value(ten/4) over w FROM (select distinct ten, four from tenk1) WINDOW w AS (partition by four order by ten/4 rows between unbounded preceding and current row) +ORDER BY four; statement error SELECT sum(unique1) over w, |