Skip to content

Commit 5dc3e23

Browse files
authored
enable idx lookup join by default in tests (#28439) (#28737)
2 parents 10cd867 + 68a5094 commit 5dc3e23

File tree

358 files changed

+84
-26879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

358 files changed

+84
-26879
lines changed

ydb/core/kqp/opt/kqp_query_plan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,9 @@ class TQueryPlanReconstructor {
23042304
lookupOps.AppendValue(std::move(lookupOp));
23052305
lookupPlan["Operators"] = std::move(lookupOps);
23062306

2307-
newPlans.AppendValue(ReconstructImpl(plan.GetMapSafe().at("Plans").GetArraySafe()[0], 0));
2307+
if (plan.GetMapSafe().contains("Plans")) {
2308+
newPlans.AppendValue(ReconstructImpl(plan.GetMapSafe().at("Plans").GetArraySafe()[0], 0));
2309+
}
23082310

23092311
newPlans.AppendValue(std::move(lookupPlan));
23102312

ydb/core/kqp/ut/join/kqp_join_ut.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,10 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
653653
}
654654

655655
Y_UNIT_TEST(LeftJoinPushdownPredicate_NestedJoin) {
656-
TKikimrRunner kikimr;
656+
TKikimrSettings appsettings;
657+
appsettings.AppConfig.MutableTableServiceConfig()->SetEnableKqpDataQueryStreamIdxLookupJoin(true);
658+
659+
TKikimrRunner kikimr(appsettings);
657660
auto db = kikimr.GetTableClient();
658661
auto session = db.CreateSession().GetValueSync().GetSession();
659662

@@ -671,7 +674,8 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
671674
INNER JOIN `/Root/Join1_3` AS t3
672675
ON t1.Fk1 = t3.Key
673676
674-
WHERE t2.Value > 1001;
677+
WHERE t2.Value > 1001
678+
675679
)"), TTxControl::BeginTx().CommitTx()).ExtractValueSync();
676680
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
677681
CompareYson(
@@ -694,7 +698,8 @@ Y_UNIT_TEST_SUITE(KqpJoin) {
694698
LEFT JOIN `/Root/Join1_2` AS t2
695699
ON t1.Fk1 = t2.Key
696700
697-
WHERE t2.Value > 1001;
701+
WHERE t2.Value > 1001
702+
ORDER BY t1.Key1, t1.Key2;
698703
)"), TTxControl::BeginTx().CommitTx()).ExtractValueSync();
699704
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
700705
CompareYson(

ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan

Lines changed: 67 additions & 152 deletions
Large diffs are not rendered by default.

ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_join_with_agg.sql-plan_/join_join_with_agg.sql.plan

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
},
2020
{
2121
"columns": [
22-
"Key"
22+
"Fk21",
23+
"Fk22",
24+
"Key",
25+
"Value"
2326
],
2427
"lookup_by": [
2528
"Key"

ydb/tests/functional/suite_tests/canondata/result.json

Lines changed: 0 additions & 1112 deletions
Large diffs are not rendered by default.

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-boolean.test_/query_1.plan

Lines changed: 0 additions & 15 deletions
This file was deleted.

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-boolean.test_/query_2.plan

Lines changed: 0 additions & 15 deletions
This file was deleted.

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-boolean.test_/query_3.plan

Lines changed: 0 additions & 15 deletions
This file was deleted.

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-boolean.test_/query_4.plan

Lines changed: 0 additions & 15 deletions
This file was deleted.

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-boolean.test_/query_5.plan

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)