diff options
author | Igor Makunin <igor.makunin@gmail.com> | 2022-04-06 17:31:36 +0300 |
---|---|---|
committer | Igor Makunin <igor.makunin@gmail.com> | 2022-04-06 17:31:36 +0300 |
commit | 4cd635ce321a71e926ad44abbf4bccdd36957776 (patch) | |
tree | a5368accd64d0d90bdd0c28952ab4e6b9a69f285 | |
parent | 724663570ded49e4ebe371a9dd81870050fb1908 (diff) | |
download | ydb-4cd635ce321a71e926ad44abbf4bccdd36957776.tar.gz |
KIKIMR-14644: fix test
ref:13491a591286526750240abe4b4c1039f6afe585
9 files changed, 22 insertions, 19 deletions
diff --git a/ydb/core/kqp/ut/kqp_explain_ut.cpp b/ydb/core/kqp/ut/kqp_explain_ut.cpp index e9b9c9880a..acf76035ca 100644 --- a/ydb/core/kqp/ut/kqp_explain_ut.cpp +++ b/ydb/core/kqp/ut/kqp_explain_ut.cpp @@ -319,7 +319,7 @@ Y_UNIT_TEST_SUITE(KqpExplain) { NJson::TJsonValue plan; NJson::ReadJsonTree(*res.PlanJson, &plan, true); - auto join1 = FindPlanNodeByKv(plan, "Node Type", "Sort-InnerJoin (MapJoin)-Filter-Aggregate-Sort"); + auto join1 = FindPlanNodeByKv(plan, "Node Type", "Sort-InnerJoin (MapJoin)-Filter-Aggregate"); UNIT_ASSERT(join1.IsDefined()); auto join2 = FindPlanNodeByKv(plan, "Node Type", "Aggregate-InnerJoin (MapJoin)-Filter"); UNIT_ASSERT(join2.IsDefined()); diff --git a/ydb/core/kqp/ut/kqp_join_ut.cpp b/ydb/core/kqp/ut/kqp_join_ut.cpp index 31e85f2755..4c238373b2 100644 --- a/ydb/core/kqp/ut/kqp_join_ut.cpp +++ b/ydb/core/kqp/ut/kqp_join_ut.cpp @@ -796,7 +796,8 @@ Y_UNIT_TEST_SUITE(KqpJoin) { ON t1.Fk21 == t2.Key1 LEFT JOIN `/Root/Join1_3` AS t3 ON t2.Fk3 = t3.Key - GROUP BY t1.Value; + GROUP BY t1.Value + ORDER BY t1.Value; )"), TTxControl::BeginTx().CommitTx()).ExtractValueSync(); UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); @@ -812,7 +813,8 @@ Y_UNIT_TEST_SUITE(KqpJoin) { ON t1.Fk21 == t2.Key1 LEFT JOIN `/Root/Join1_3` AS t3 ON t2.Fk3 = t3.Key - GROUP BY t1.Value LIMIT 3; + GROUP BY t1.Value + ORDER BY t1.Value LIMIT 3; )"), TTxControl::BeginTx().CommitTx()).ExtractValueSync(); UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q11.sql-result_sets_/simple_q11.sql.results b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q11.sql-result_sets_/simple_q11.sql.results index bcbf6a8c7b..1fef0c04ab 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q11.sql-result_sets_/simple_q11.sql.results +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q11.sql-result_sets_/simple_q11.sql.results @@ -5,12 +5,12 @@ "b": "one" }, { - "a": "b", - "b": "two" - }, - { "a": "c", "b": "three" + }, + { + "a": "b", + "b": "two" } ] ]
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q4.sql-result_sets_/simple_q4.sql.results b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q4.sql-result_sets_/simple_q4.sql.results index 76760b19cd..3592cf5f8a 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q4.sql-result_sets_/simple_q4.sql.results +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q4.sql-result_sets_/simple_q4.sql.results @@ -6,11 +6,11 @@ }, { "cnt": 1, - "max": "c" + "max": "b" }, { "cnt": 1, - "max": "b" + "max": "c" } ] ]
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q5.sql-result_sets_/simple_q5.sql.results b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q5.sql-result_sets_/simple_q5.sql.results index 24498474ae..5094f357c6 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q5.sql-result_sets_/simple_q5.sql.results +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_q5.sql-result_sets_/simple_q5.sql.results @@ -1,16 +1,16 @@ [ [ { - "column0": 1, - "column1": "a" + "cnt": 1, + "m": "a" }, { - "column0": 1, - "column1": "c" + "cnt": 1, + "m": "b" }, { - "column0": 1, - "column1": "b" + "cnt": 1, + "m": "c" } ] ]
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/sql/join/group_by_lookup.script b/ydb/tests/functional/canonical/sql/join/group_by_lookup.script index cf1ab66d50..6c9d556f95 100644 --- a/ydb/tests/functional/canonical/sql/join/group_by_lookup.script +++ b/ydb/tests/functional/canonical/sql/join/group_by_lookup.script @@ -19,4 +19,5 @@ $agg = ( SELECT a.Group, a.Count, t.Value FROM $agg AS a LEFT JOIN Temp AS t -ON a.Group = t.Group; +ON a.Group = t.Group +ORDER BY a.Group, a.Count, t.Value diff --git a/ydb/tests/functional/canonical/sql/simple/q11.sql b/ydb/tests/functional/canonical/sql/simple/q11.sql index 98e623b2ec..7a92a19d46 100644 --- a/ydb/tests/functional/canonical/sql/simple/q11.sql +++ b/ydb/tests/functional/canonical/sql/simple/q11.sql @@ -1,2 +1,2 @@ -select distinct b, a from (select a, b from t1 union all select b, a from t1); +select distinct b, a from (select a, b from t1 union all select b, a from t1) order by b, a; diff --git a/ydb/tests/functional/canonical/sql/simple/q4.sql b/ydb/tests/functional/canonical/sql/simple/q4.sql index 21387767a6..765f259ad1 100644 --- a/ydb/tests/functional/canonical/sql/simple/q4.sql +++ b/ydb/tests/functional/canonical/sql/simple/q4.sql @@ -1,2 +1,2 @@ -select count(*) as cnt, max(a) as max from t1 group by b; +select count(*) as cnt, max(a) as max from t1 group by b order by cnt, max; diff --git a/ydb/tests/functional/canonical/sql/simple/q5.sql b/ydb/tests/functional/canonical/sql/simple/q5.sql index a3f83bcd13..b1b5c042ff 100644 --- a/ydb/tests/functional/canonical/sql/simple/q5.sql +++ b/ydb/tests/functional/canonical/sql/simple/q5.sql @@ -1,2 +1,2 @@ -select count(*), max(a) from t1 group by b having count(*)=1; +select count(*) as cnt, max(a) as m from t1 group by b having count(*)=1 order by cnt, m; |