aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitalii Gridnev <gridnevvvit@gmail.com>2022-07-07 00:38:42 +0300
committerVitalii Gridnev <gridnevvvit@gmail.com>2022-07-07 00:38:42 +0300
commit8a27c88d604aa90a6e1e1c3b384dca1e3cf3a875 (patch)
tree9f6041700894be06da19eadde60a0bd9271f6e46
parent22582e8bdf593db877e5482334f2eaac06f623fc (diff)
downloadydb-8a27c88d604aa90a6e1e1c3b384dca1e3cf3a875.tar.gz
fix tests
ref:b4c6a345f6da12b318c435d81e7504e0f9fe91b0
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan2
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-window.test_/query_728
-rw-r--r--ydb/tests/functional/suite_tests/canondata/test_stream_query.TestStreamQuery.test_sql_suite_results-window.test_/window.test.out146
4 files changed, 89 insertions, 89 deletions
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
index 253c1fd9b6..26499b5fab 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_1.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.1\",\n \"type\":\"query\"\n },\n \"tables\":\n [\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i\",\n \"k\"\n ],\n \"columns\":\n [\n \"i\",\n \"k\"\n ]\n }\n ]\n }\n ]\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.1\",\n \"type\":\"query\"\n },\n \"tables\":\n [\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J1_TBL\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"i\",\n \"j\",\n \"t\"\n ],\n \"columns\":\n [\n \"i\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join1.test_plan\\/J2_TBL\",\n \"reads\":\n [\n {\n \"type\":\"MultiLookup\",\n \"lookup_by\":\n [\n \"i (expr)\"\n ],\n \"scan_by\":\n [\n \"k\"\n ],\n \"columns\":\n [\n \"k\"\n ]\n }\n ]\n }\n ]\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
index e5d32cd207..6c19cbf9fe 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_7.plan
@@ -1 +1 @@
-"{\n \"meta\":\n {\n \"version\":\"0.1\",\n \"type\":\"query\"\n },\n \"tables\":\n [\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt5\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1\",\n \"f2\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt6\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1\",\n \"f2\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n }\n ]\n}" \ No newline at end of file
+"{\n \"meta\":\n {\n \"version\":\"0.1\",\n \"type\":\"query\"\n },\n \"tables\":\n [\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt5\",\n \"reads\":\n [\n {\n \"type\":\"FullScan\",\n \"scan_by\":\n [\n \"f1\",\n \"f2\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n },\n {\n \"name\":\"\\/Root\\/postgres_jointest\\/join4.test_plan\\/tt6\",\n \"reads\":\n [\n {\n \"type\":\"MultiLookup\",\n \"lookup_by\":\n [\n \"f1 (expr)\"\n ],\n \"scan_by\":\n [\n \"f2\"\n ],\n \"columns\":\n [\n \"f1\",\n \"f2\"\n ]\n }\n ]\n }\n ]\n}" \ No newline at end of file
diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-window.test_/query_7 b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-window.test_/query_7
index f526bde5c9..856bc49955 100644
--- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-window.test_/query_7
+++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_results-window.test_/query_7
@@ -1,25 +1,17 @@
[
{
- "column0": 6000,
+ "column0": 5000,
"column1": 1
},
{
- "column0": 11200,
+ "column0": 9800,
"column1": 2
},
{
- "column0": 16400,
+ "column0": 14600,
"column1": 2
},
{
- "column0": 20900,
- "column1": 4
- },
- {
- "column0": 25100,
- "column1": 5
- },
- {
"column0": 3900,
"column1": 1
},
@@ -28,15 +20,23 @@
"column1": 2
},
{
- "column0": 5000,
+ "column0": 6000,
"column1": 1
},
{
- "column0": 9800,
+ "column0": 11200,
"column1": 2
},
{
- "column0": 14600,
+ "column0": 16400,
"column1": 2
+ },
+ {
+ "column0": 20900,
+ "column1": 4
+ },
+ {
+ "column0": 25100,
+ "column1": 5
}
] \ No newline at end of file
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 8da5d0b366..a119b3b90e 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
@@ -7,13 +7,13 @@ SELECT depname, empno, salary, sum(salary) OVER w FROM empsalary WINDOW w AS (PA
--------------+-------+--------+---------
b'develop' | 7 | 4200 | 25100
b'develop' | 9 | 4500 | 25100
- b'develop' | 10 | 5200 | 25100
b'develop' | 11 | 5200 | 25100
+ b'develop' | 10 | 5200 | 25100
b'develop' | 8 | 6000 | 25100
b'personnel' | 5 | 3500 | 7400
b'personnel' | 2 | 3900 | 7400
- b'sales' | 4 | 4800 | 14600
b'sales' | 3 | 4800 | 14600
+ b'sales' | 4 | 4800 | 14600
b'sales' | 1 | 5000 | 14600
(10 rows)
@@ -25,16 +25,16 @@ SELECT depname, empno, salary, rank() OVER w FROM empsalary WINDOW w AS (PARTITI
depname | empno | salary | column3
--------------+-------+--------+---------
+ b'sales' | 3 | 4800 | 1
+ b'sales' | 4 | 4800 | 1
+ b'sales' | 1 | 5000 | 3
+ b'personnel' | 5 | 3500 | 1
+ b'personnel' | 2 | 3900 | 2
b'develop' | 7 | 4200 | 1
b'develop' | 9 | 4500 | 2
- b'develop' | 11 | 5200 | 3
b'develop' | 10 | 5200 | 3
+ b'develop' | 11 | 5200 | 3
b'develop' | 8 | 6000 | 5
- b'personnel' | 5 | 3500 | 1
- b'personnel' | 2 | 3900 | 2
- b'sales' | 4 | 4800 | 1
- b'sales' | 3 | 4800 | 1
- b'sales' | 1 | 5000 | 3
(10 rows)
@@ -76,16 +76,16 @@ SELECT depname, empno, salary, sum(salary) OVER w FROM empsalary WINDOW w AS (PA
depname | empno | salary | column3
--------------+-------+--------+---------
+ b'sales' | 1 | 5000 | 14600
+ b'sales' | 3 | 4800 | 14600
+ b'sales' | 4 | 4800 | 14600
+ b'personnel' | 2 | 3900 | 7400
+ b'personnel' | 5 | 3500 | 7400
b'develop' | 7 | 4200 | 25100
- b'develop' | 10 | 5200 | 25100
- b'develop' | 9 | 4500 | 25100
b'develop' | 8 | 6000 | 25100
+ b'develop' | 9 | 4500 | 25100
+ b'develop' | 10 | 5200 | 25100
b'develop' | 11 | 5200 | 25100
- b'personnel' | 5 | 3500 | 7400
- b'personnel' | 2 | 3900 | 7400
- b'sales' | 4 | 4800 | 14600
- b'sales' | 3 | 4800 | 14600
- b'sales' | 1 | 5000 | 14600
(10 rows)
@@ -96,15 +96,15 @@ SELECT depname, empno, salary, rank() OVER w AS r FROM empsalary WINDOW w AS (PA
depname | empno | salary | r
--------------+-------+--------+---
- b'develop' | 7 | 4200 | 1
b'sales' | 3 | 4800 | 1
b'sales' | 4 | 4800 | 1
+ b'develop' | 7 | 4200 | 1
b'personnel' | 5 | 3500 | 1
b'personnel' | 2 | 3900 | 2
b'develop' | 9 | 4500 | 2
+ b'sales' | 1 | 5000 | 3
b'develop' | 10 | 5200 | 3
b'develop' | 11 | 5200 | 3
- b'sales' | 1 | 5000 | 3
b'develop' | 8 | 6000 | 5
(10 rows)
@@ -144,15 +144,15 @@ SELECT sum(four) OVER w AS sum_1, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW
sum_1 | ten | four
-------+-----+------
- 0 | 0 | 0
- 0 | 0 | 0
- 2 | 0 | 2
3 | 1 | 3
4 | 1 | 1
5 | 1 | 1
3 | 3 | 3
- 0 | 4 | 0
+ 0 | 0 | 0
+ 0 | 0 | 0
+ 2 | 0 | 2
1 | 7 | 1
+ 0 | 4 | 0
1 | 9 | 1
(10 rows)
@@ -184,6 +184,8 @@ SELECT rank() OVER w AS rank_1, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
rank_1 | ten | four
--------+-----+------
+ 1 | 1 | 3
+ 2 | 3 | 3
1 | 0 | 0
1 | 0 | 0
3 | 4 | 0
@@ -192,8 +194,6 @@ SELECT rank() OVER w AS rank_1, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
3 | 7 | 1
4 | 9 | 1
1 | 0 | 2
- 1 | 1 | 3
- 2 | 3 | 3
(10 rows)
@@ -204,6 +204,8 @@ SELECT dense_rank() OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS
column0 | ten | four
---------+-----+------
+ 1 | 1 | 3
+ 2 | 3 | 3
1 | 0 | 0
1 | 0 | 0
2 | 4 | 0
@@ -212,8 +214,6 @@ SELECT dense_rank() OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS
2 | 7 | 1
3 | 9 | 1
1 | 0 | 2
- 1 | 1 | 3
- 2 | 3 | 3
(10 rows)
@@ -224,6 +224,8 @@ SELECT lag(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PAR
column0 | ten | four
---------+-----+------
+ None | 1 | 3
+ 1 | 3 | 3
None | 0 | 0
0 | 0 | 0
0 | 4 | 0
@@ -232,8 +234,6 @@ SELECT lag(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PAR
1 | 7 | 1
7 | 9 | 1
None | 0 | 2
- None | 1 | 3
- 1 | 3 | 3
(10 rows)
@@ -244,6 +244,8 @@ SELECT lead(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PA
column0 | ten | four
---------+-----+------
+ 3 | 1 | 3
+ None | 3 | 3
0 | 0 | 0
4 | 0 | 0
None | 4 | 0
@@ -252,8 +254,6 @@ SELECT lead(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PA
9 | 7 | 1
None | 9 | 1
None | 0 | 2
- 3 | 1 | 3
- None | 3 | 3
(10 rows)
@@ -264,6 +264,8 @@ SELECT lead(ten * 2, 1) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
column0 | ten | four
---------+-----+------
+ 6 | 1 | 3
+ None | 3 | 3
0 | 0 | 0
8 | 0 | 0
None | 4 | 0
@@ -272,8 +274,6 @@ SELECT lead(ten * 2, 1) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
18 | 7 | 1
None | 9 | 1
None | 0 | 2
- 6 | 1 | 3
- None | 3 | 3
(10 rows)
@@ -284,6 +284,8 @@ SELECT first_value(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
column0 | ten | four
---------+-----+------
+ 1 | 1 | 3
+ 1 | 3 | 3
0 | 0 | 0
0 | 0 | 0
0 | 4 | 0
@@ -292,8 +294,6 @@ SELECT first_value(ten) OVER w, ten, four FROM tenk1 WHERE unique2 < 10 WINDOW w
1 | 7 | 1
1 | 9 | 1
0 | 0 | 2
- 1 | 1 | 3
- 1 | 3 | 3
(10 rows)
@@ -368,12 +368,12 @@ SELECT count(*) OVER w, four FROM (SELECT * FROM tenk1 WHERE two = 1) WHERE uniq
column0 | four
---------+------
+ 2 | 3
+ 2 | 3
4 | 1
4 | 1
4 | 1
4 | 1
- 2 | 3
- 2 | 3
(6 rows)
@@ -386,16 +386,16 @@ WINDOW w AS (PARTITION BY four ORDER BY ten);
cntsum
--------
- 1
+ 92
+ 136
+ 21
22
87
- 2
+ 22
24
82
92
51
- 92
- 136
(10 rows)
@@ -422,6 +422,8 @@ SELECT avg(four) OVER w FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PARTITION BY
column0
---------
+ 3.0
+ 3.0
0.0
0.0
0.0
@@ -430,8 +432,6 @@ SELECT avg(four) OVER w FROM tenk1 WHERE unique2 < 10 WINDOW w AS (PARTITION BY
1.0
1.0
2.0
- 3.0
- 3.0
(10 rows)
@@ -509,16 +509,16 @@ SELECT sum(salary) OVER w, rank() OVER w FROM empsalary WINDOW w AS (PARTITION B
column0 | column1
---------+---------
+ 5000 | 1
+ 9800 | 2
+ 14600 | 2
+ 3900 | 1
+ 7400 | 2
6000 | 1
11200 | 2
16400 | 2
20900 | 4
25100 | 5
- 3900 | 1
- 7400 | 2
- 5000 | 1
- 9800 | 2
- 14600 | 2
(10 rows)
@@ -600,13 +600,13 @@ select first_value(max(x)) over w, y
column0 | y
---------+----
- 9980 | 0
- 9980 | 2
- 9980 | 4
- 9980 | 6
- 9980 | 8
- 9980 | 10
- 9980 | 12
+ 9999 | 12
+ 9999 | 10
+ 9999 | 8
+ 9999 | 6
+ 9999 | 4
+ 9999 | 2
+ 9999 | 0
(7 rows)
@@ -626,21 +626,21 @@ WINDOW w AS (partition by four order by ten);
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
- 2 | 6 | 12 | 6
- 2 | 8 | 20 | 8
3 | 1 | 1 | 1
3 | 3 | 4 | 3
3 | 5 | 9 | 5
3 | 7 | 16 | 7
3 | 9 | 25 | 9
+ 2 | 0 | 0 | 0
+ 2 | 2 | 2 | 2
+ 2 | 4 | 6 | 4
+ 2 | 6 | 12 | 6
+ 2 | 8 | 20 | 8
+ 1 | 1 | 1 | 1
+ 1 | 3 | 4 | 3
+ 1 | 5 | 9 | 5
+ 1 | 7 | 16 | 7
+ 1 | 9 | 25 | 9
(20 rows)
@@ -660,21 +660,21 @@ WINDOW w AS (partition by four order by ten/4 rows between unbounded preceding a
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
- 2 | 1 | 2 | 1
- 2 | 2 | 4 | 2
3 | 0 | 0 | 0
3 | 0 | 0 | 0
3 | 1 | 1 | 1
3 | 1 | 2 | 1
3 | 2 | 4 | 2
+ 2 | 0 | 0 | 0
+ 2 | 0 | 0 | 0
+ 2 | 1 | 1 | 1
+ 2 | 1 | 2 | 1
+ 2 | 2 | 4 | 2
+ 1 | 0 | 0 | 0
+ 1 | 0 | 0 | 0
+ 1 | 1 | 1 | 1
+ 1 | 1 | 2 | 1
+ 1 | 2 | 4 | 2
(20 rows)