diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp index 5119d7769d20..7ec98aa7f569 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp @@ -210,8 +210,8 @@ class TKqpLogicalOptTransformer : public TOptimizeTransformerBase { return output; } - TMaybeNode DeleteOverLookup(TExprBase node, TExprContext& ctx) { - TExprBase output = KqpDeleteOverLookup(node, ctx, KqpCtx); + TMaybeNode DeleteOverLookup(TExprBase node, TExprContext& ctx, const TGetParents& getParents) { + TExprBase output = KqpDeleteOverLookup(node, ctx, KqpCtx, *getParents()); DumpAppliedRule("DeleteOverLookup", node.Ptr(), output.Ptr(), ctx); return output; } diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp index aa4dfb187fde..97eb40f86824 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_effects.cpp @@ -2,22 +2,61 @@ #include #include +#include + +namespace { + +bool CanPushFlatMap(const NYql::NNodes::TCoFlatMapBase& flatMap, const NYql::TKikimrTableDescription& tableDesc, const NYql::TParentsMap& parentsMap, TVector & extraColumns) { + auto flatMapLambda = flatMap.Lambda(); + if (!NYql::IsFilterFlatMap(flatMapLambda)) { + return false; + } + + const auto & flatMapLambdaArgument = flatMapLambda.Args().Arg(0).Ref(); + auto flatMapLambdaConditional = flatMapLambda.Body().Cast(); + + TSet lambdaSubset; + auto isSubSet = HaveFieldsSubset(flatMapLambdaConditional.Predicate().Ptr(), flatMapLambdaArgument, lambdaSubset, parentsMap, true); + auto argType = NYql::RemoveOptionalType(flatMapLambdaArgument.GetTypeAnn()); + if (argType->GetKind() != NYql::ETypeAnnotationKind::Struct) { + return false; + } + // helper doesn't accept if all columns are used + if (!isSubSet && lambdaSubset.size() != argType->Cast()->GetSize()) { + return false; + } + + for (auto & lambdaColumn : lambdaSubset) { + auto columnIndex = tableDesc.GetKeyColumnIndex(lambdaColumn); + if (!columnIndex) { + return false; + } + } + + extraColumns.insert(extraColumns.end(), lambdaSubset.begin(), lambdaSubset.end()); + return true; +} + +} namespace NKikimr::NKqp::NOpt { using namespace NYql; using namespace NYql::NNodes; -TExprBase KqpDeleteOverLookup(const TExprBase& node, TExprContext& ctx, const TKqpOptimizeContext &kqpCtx) { +TExprBase KqpDeleteOverLookup(const TExprBase& node, TExprContext& ctx, const TKqpOptimizeContext &kqpCtx, const NYql::TParentsMap& parentsMap) { if (!node.Maybe()) { return node; } auto deleteRows = node.Cast(); + TMaybeNode filter; + TMaybeNode lookup; TMaybeNode read; TMaybeNode skipNulMembers; + TMaybeNode readranges; if (deleteRows.Input().Maybe()) { lookup = deleteRows.Input().Cast(); @@ -27,7 +66,15 @@ TExprBase KqpDeleteOverLookup(const TExprBase& node, TExprContext& ctx, const TK } else if (deleteRows.Input().Maybe()) { read = deleteRows.Input().Cast(); } else { - return node; + TMaybeNode input = deleteRows.Input(); + if (input.Maybe()) { + filter = deleteRows.Input().Cast(); + input = filter.Input(); + } + readranges = input.Maybe(); + if (!readranges) { + return node; + } } TMaybeNode deleteInput; @@ -90,7 +137,34 @@ TExprBase KqpDeleteOverLookup(const TExprBase& node, TExprContext& ctx, const TK .Add(structMembers) .Build() .Done(); - } + } else if (readranges) { + if (deleteRows.Table().Raw() != readranges.Cast().Table().Raw()) { + return node; + } + + if (!readranges.Cast().PrefixPointsExpr()) { + return node; + } + + const auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, readranges.Cast().Table().Path().Value()); + auto hint = TKqpReadTableExplainPrompt::Parse(readranges.Cast().ExplainPrompt()); + if (hint.PointPrefixLen != tableDesc.Metadata->KeyColumnNames.size()) { + return node; + } + + if (filter) { + TVector extraColumns; + if (!CanPushFlatMap(filter.Cast(), tableDesc, parentsMap, extraColumns)) { + return node; + } + deleteInput = Build(ctx, node.Pos()) + .Lambda(filter.Lambda().Cast()) + .Input(readranges.PrefixPointsExpr().Cast()) + .Done(); + } else { + deleteInput = readranges.PrefixPointsExpr(); + } + } YQL_ENSURE(deleteInput); diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp index 5a8ff001bcd5..a4ed3c3c62bf 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp @@ -466,10 +466,6 @@ TExprBase KqpPushExtractedPredicateToReadTable(TExprBase node, TExprContext& ctx .Done(); } } - } else if (buildResult.PointPrefixLen == tableDesc.Metadata->KeyColumnNames.size()) { - YQL_ENSURE(prefixPointsExpr); - residualLambda = pointsExtractionResult.PrunedLambda; - buildLookup(prefixPointsExpr, input); } } diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h b/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h index 97b61b836c0b..9f4852eff0c9 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h @@ -53,7 +53,7 @@ NYql::NNodes::TExprBase KqpRewriteTakeOverIndexRead(const NYql::NNodes::TExprBas const TKqpOptimizeContext& kqpCtx, const NYql::TParentsMap& parentsMap); NYql::NNodes::TExprBase KqpDeleteOverLookup(const NYql::NNodes::TExprBase& node, NYql::TExprContext& ctx, - const TKqpOptimizeContext &kqpCtx); + const TKqpOptimizeContext &kqpCtx, const NYql::TParentsMap& parentsMap); NYql::NNodes::TExprBase KqpExcessUpsertInputColumns(const NYql::NNodes::TExprBase& node, NYql::TExprContext& ctx); diff --git a/ydb/core/kqp/ut/opt/kqp_extract_predicate_unpack_ut.cpp b/ydb/core/kqp/ut/opt/kqp_extract_predicate_unpack_ut.cpp index 6977d7981c5c..8c2c10f23a39 100644 --- a/ydb/core/kqp/ut/opt/kqp_extract_predicate_unpack_ut.cpp +++ b/ydb/core/kqp/ut/opt/kqp_extract_predicate_unpack_ut.cpp @@ -359,82 +359,6 @@ Y_UNIT_TEST(ComplexRange) { 2); } -Y_UNIT_TEST(SqlIn) { - Test( - R"( - SELECT * FROM `/Root/SimpleKey` - WHERE Key IN AsList(100, 102, (100 + 3)) - ORDER BY Key; - )", - R"([ - [[100];["Value20"]];[[102];["Value22"]];[[103];["Value23"]] - ])"); -} - -Y_UNIT_TEST(BasicLookup) { - Test( - R"( - SELECT * FROM `/Root/SimpleKey` - WHERE Key = 100 or Key = 102 or Key = 103 or Key = null; - )", - R"([ - [[100];["Value20"]];[[102];["Value22"]];[[103];["Value23"]] - ])"); -} - -Y_UNIT_TEST(ComplexLookup) { - Test( - R"( - SELECT Key, Value FROM `/Root/SimpleKey` - WHERE Key = 100 or Key = 102 or Key = (100 + 3); - )", - R"([ - [[100];["Value20"]];[[102];["Value22"]];[[103];["Value23"]] - ])"); -} - -Y_UNIT_TEST(SqlInComplexKey) { - Test( - R"( - SELECT Key, Fk, Value FROM `/Root/ComplexKey` - WHERE (Key, Fk) IN AsList( - (1, 101), - (2, 102), - (2, 102 + 1), - ) - ORDER BY Key, Fk; - )", - R"([ - [[1];[101];["Value1"]];[[2];[102];["Value1"]];[[2];[103];["Value3"]] - ])"); -} - -Y_UNIT_TEST(BasicLookupComplexKey) { - Test( - R"( - SELECT Key, Fk, Value FROM `/Root/ComplexKey` - WHERE (Key = 1 and Fk = 101) OR - (2 = Key and 102 = Fk) OR - (2 = Key and 103 = Fk); - )", - R"([ - [[1];[101];["Value1"]];[[2];[102];["Value1"]];[[2];[103];["Value3"]] - ])"); -} - -Y_UNIT_TEST(ComplexLookupComplexKey) { - Test( - R"( - SELECT Key, Fk, Value FROM `/Root/ComplexKey` - WHERE (Key = 1 and Fk = 101) OR - (2 = Key and 102 = Fk) OR - (2 = Key and 102 + 1 = Fk); - )", - R"([ - [[1];[101];["Value1"]];[[2];[102];["Value1"]];[[2];[103];["Value3"]] - ])"); -} - Y_UNIT_TEST(PointJoin) { Test( R"( diff --git a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp index 5628244bcf25..29ca801dce6c 100644 --- a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp +++ b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp @@ -204,25 +204,23 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) { SELECT * FROM `/Root/Test` WHERE Group = $group AND Name = $name; )"; - auto explainResult = session.ExplainDataQuery(query).GetValueSync(); - UNIT_ASSERT_VALUES_EQUAL_C(explainResult.GetStatus(), EStatus::SUCCESS, explainResult.GetIssues().ToString()); - - if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) { - UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpCnStreamLookup"), explainResult.GetAst()); - } else { - UNIT_ASSERT_C(explainResult.GetAst().Contains("KqpLookupTable"), explainResult.GetAst()); - } - auto params = kikimr.GetTableClient().GetParamsBuilder() .AddParam("$group").OptionalUint32(1).Build() .AddParam("$name").OptionalString("Paul").Build() .Build(); + NYdb::NTable::TExecDataQuerySettings execSettings; + execSettings.CollectQueryStats(ECollectQueryStatsMode::Profile); + auto result = session.ExecuteDataQuery(query, - TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(), params).ExtractValueSync(); + TTxControl::BeginTx(TTxSettings::SerializableRW()).CommitTx(), params, execSettings).ExtractValueSync(); UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); CompareYson(R"([[[300u];["None"];[1u];["Paul"]]])", FormatResultSetYson(result.GetResultSet(0))); + AssertTableStats(result, "/Root/Test", { + .ExpectedReads = 1, + }); + params = kikimr.GetTableClient().GetParamsBuilder() .AddParam("$group").OptionalUint32(1).Build() .Build(); diff --git a/ydb/core/kqp/ut/pg/kqp_pg_ut.cpp b/ydb/core/kqp/ut/pg/kqp_pg_ut.cpp index 9887464a6ae2..668f535ad1db 100644 --- a/ydb/core/kqp/ut/pg/kqp_pg_ut.cpp +++ b/ydb/core/kqp/ut/pg/kqp_pg_ut.cpp @@ -3882,6 +3882,9 @@ Y_UNIT_TEST_SUITE(KqpPg) { auto fullScan = FindPlanNodeByKv(plan, "Node Type", "Filter-TableFullScan"); UNIT_ASSERT_C(!fullScan.IsDefined(), "got fullscan, expected lookup"); auto lookup = FindPlanNodeByKv(plan, "Node Type", "TableLookup"); + if (!lookup.IsDefined()) { + lookup = FindPlanNodeByKv(plan, "Node Type", "TableRangeScan"); + } UNIT_ASSERT_C(lookup.IsDefined(), "no Table Lookup in plan"); } { diff --git a/ydb/core/kqp/ut/query/kqp_explain_ut.cpp b/ydb/core/kqp/ut/query/kqp_explain_ut.cpp index 0a101ca68902..079c49e03730 100644 --- a/ydb/core/kqp/ut/query/kqp_explain_ut.cpp +++ b/ydb/core/kqp/ut/query/kqp_explain_ut.cpp @@ -493,18 +493,23 @@ Y_UNIT_TEST_SUITE(KqpExplain) { NJson::ReadJsonTree(result.GetPlan(), &plan, true); UNIT_ASSERT(ValidatePlanNodeIds(plan)); + Cerr << "Plan " << result.GetPlan() << Endl; + auto node = FindPlanNodeByKv(plan, "Name", "TableRangeScan"); UNIT_ASSERT_EQUAL(node.GetMapSafe().at("Table").GetStringSafe(), "KeyValue"); node = FindPlanNodeByKv(plan, "Name", "TableFullScan"); UNIT_ASSERT_EQUAL(node.GetMapSafe().at("Table").GetStringSafe(), "KeyValue"); + if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) { node = FindPlanNodeByKv(plan, "Node Type", "TableLookup"); } else { node = FindPlanNodeByKv(plan, "Name", "TablePointLookup"); } - UNIT_ASSERT_EQUAL(node.GetMapSafe().at("Table").GetStringSafe(), "KeyValue"); + if (node.IsDefined()) { + UNIT_ASSERT_EQUAL(node.GetMapSafe().at("Table").GetStringSafe(), "KeyValue"); + } } Y_UNIT_TEST(FewEffects) { @@ -536,16 +541,7 @@ Y_UNIT_TEST_SUITE(KqpExplain) { UNIT_ASSERT_VALUES_EQUAL(fullScansCount, 1); auto rangeScansCount = CountPlanNodesByKv(plan, "Node Type", "TableRangeScan"); - UNIT_ASSERT_VALUES_EQUAL(rangeScansCount, 1); - - ui32 lookupsCount = 0; - if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) { - lookupsCount = CountPlanNodesByKv(plan, "Node Type", "TableLookup"); - } else { - lookupsCount = CountPlanNodesByKv(plan, "Node Type", "TablePointLookup-ConstantExpr"); - } - - UNIT_ASSERT_VALUES_EQUAL(lookupsCount, 1); + UNIT_ASSERT_VALUES_EQUAL(rangeScansCount, 2); /* check tables section */ const auto& tableInfo = plan.GetMapSafe().at("tables").GetArraySafe()[0].GetMapSafe(); @@ -565,7 +561,6 @@ Y_UNIT_TEST_SUITE(KqpExplain) { UNIT_ASSERT_VALUES_EQUAL(counter["MultiErase"], deletesCount); UNIT_ASSERT_VALUES_EQUAL(counter["FullScan"], fullScansCount); UNIT_ASSERT_VALUES_EQUAL(counter["Scan"], rangeScansCount); - UNIT_ASSERT_VALUES_EQUAL(counter["Lookup"], lookupsCount); } Y_UNIT_TEST(ExplainDataQueryWithParams) { diff --git a/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp b/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp index bf56e63e7985..a39c839e6ee2 100644 --- a/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp +++ b/ydb/core/kqp/ut/tx/kqp_mvcc_ut.cpp @@ -50,21 +50,12 @@ Y_UNIT_TEST_SUITE(KqpSnapshotRead) { if (result.GetStatus() == EStatus::SUCCESS) continue; - if (settings.AppConfig.GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) { - UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR, - [](const NYql::TIssue& issue){ - return issue.GetMessage().Contains("has no snapshot at"); - }), result.GetIssues().ToString()); - - UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::ABORTED); - } else { - UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR, - [](const NYql::TIssue& issue){ - return issue.GetMessage().Contains("stale snapshot"); - }), result.GetIssues().ToString()); - - UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::PRECONDITION_FAILED); - } + UNIT_ASSERT_C(HasIssue(result.GetIssues(), NYql::TIssuesIds::DEFAULT_ERROR, + [](const NYql::TIssue& issue){ + return issue.GetMessage().Contains("has no snapshot at"); + }), result.GetIssues().ToString()); + + UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::ABORTED); caught = true; break; diff --git a/ydb/core/kqp/ut/yql/kqp_scripting_ut.cpp b/ydb/core/kqp/ut/yql/kqp_scripting_ut.cpp index 077bab42893b..6525749d7ce2 100644 --- a/ydb/core/kqp/ut/yql/kqp_scripting_ut.cpp +++ b/ydb/core/kqp/ut/yql/kqp_scripting_ut.cpp @@ -942,7 +942,8 @@ Y_UNIT_TEST_SUITE(KqpScripting) { auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats()); - UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2); + UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3); + UNIT_ASSERT(stats.query_phases(1).table_access().empty()); for (const auto& phase : stats.query_phases()) { if (phase.table_access().size()) { if (phase.table_access(0).name() == "/Root/EightShard") { diff --git a/ydb/core/tx/datashard/datashard_ut_trace.cpp b/ydb/core/tx/datashard/datashard_ut_trace.cpp index b1a2780486a5..b7be979310cc 100644 --- a/ydb/core/tx/datashard/datashard_ut_trace.cpp +++ b/ydb/core/tx/datashard/datashard_ut_trace.cpp @@ -292,7 +292,7 @@ Y_UNIT_TEST_SUITE(TDataShardTrace) { TFakeWilsonUploader::Trace &trace = uploader->Traces.begin()->second; std::string canon; - if (server->GetSettings().AppConfig->GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup()) { + if (server->GetSettings().AppConfig->GetTableServiceConfig().GetEnableKqpDataQueryStreamLookup() || server->GetSettings().AppConfig->GetTableServiceConfig().GetPredicateExtract20()) { auto readActorSpan = trace.Root.BFSFindOne("ReadActor"); UNIT_ASSERT(readActorSpan); diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_bool.sql-plan_/pk_predicate_pk_predicate_bool.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_bool.sql-plan_/pk_predicate_pk_predicate_bool.sql.plan index 2e90591dc305..0e2fc1666096 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_bool.sql-plan_/pk_predicate_pk_predicate_bool.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_bool.sql-plan_/pk_predicate_pk_predicate_bool.sql.plan @@ -7,6 +7,19 @@ { "name": "/local/base_pk_predicate_pk_predicate_bool_sql_plan/Input4", "reads": [ + { + "columns": [ + "Value" + ], + "limit": "1001", + "scan_by": [ + "Key1 [false, false]", + "Key2 [true, true]", + "Key1 [true, true]", + "Key2 [false, false]" + ], + "type": "Scan" + }, { "columns": [ "Value" @@ -32,12 +45,6 @@ "Key2 (null, true)" ], "type": "Scan" - }, - { - "columns": [ - "Value" - ], - "type": "Lookup" } ] } diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_dependent.sql-plan_/pk_predicate_pk_predicate_dependent.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_dependent.sql-plan_/pk_predicate_pk_predicate_dependent.sql.plan index 20d68d9abb57..c917ac54fb0b 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_dependent.sql-plan_/pk_predicate_pk_predicate_dependent.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_dependent.sql-plan_/pk_predicate_pk_predicate_dependent.sql.plan @@ -14,7 +14,8 @@ "Group", "Name" ], - "type": "Lookup" + "limit": "1001", + "type": "Scan" } ] }, diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp.sql.plan index 8630c3197bd2..ae37c577fefd 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp.sql.plan @@ -14,7 +14,13 @@ "Group", "Name" ], - "type": "Lookup" + "scan_by": [ + "Group [1, 1]", + "Name [Name1, Name1]", + "Group [4, 4]", + "Name [Name4, Name4]" + ], + "type": "Scan" } ] } diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp_1.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp_1.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp_1.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp_1.sql.plan index 99d5ddfc731a..abe86d3d8ec2 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp_1.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp_1.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_equi_multi_rp_1.sql-plan_/pk_predicate_pk_predicate_equi_multi_rp_1.sql.plan @@ -14,7 +14,15 @@ "Group", "Name" ], - "type": "Lookup" + "scan_by": [ + "Group [1, 1]", + "Name [Name1, Name1]", + "Group [4, 4]", + "Name [Name4, Name4]", + "Group [6, 6]", + "Name [Name2, Name2]" + ], + "type": "Scan" } ] } diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in.sql-plan_/pk_predicate_pk_predicate_in.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in.sql-plan_/pk_predicate_pk_predicate_in.sql.plan index 8800e380e74f..aa77245cbddc 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in.sql-plan_/pk_predicate_pk_predicate_in.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in.sql-plan_/pk_predicate_pk_predicate_in.sql.plan @@ -13,7 +13,15 @@ "Value1", "Value2" ], - "type": "Lookup" + "limit": "1001", + "scan_by": [ + "Key [1, 1]", + "Key [3, 3]", + "Key [7, 7]", + "Key [9, 9]", + "Key [11, 11]" + ], + "type": "Scan" } ] } diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in_rp.sql-plan_/pk_predicate_pk_predicate_in_rp.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in_rp.sql-plan_/pk_predicate_pk_predicate_in_rp.sql.plan index 27f04a14075d..67605c614ec1 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in_rp.sql-plan_/pk_predicate_pk_predicate_in_rp.sql.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_pk_predicate_pk_predicate_in_rp.sql-plan_/pk_predicate_pk_predicate_in_rp.sql.plan @@ -13,7 +13,12 @@ "Value1", "Value2" ], - "type": "Lookup" + "scan_by": [ + "Key [1, 1]", + "Key [3, 3]", + "Key [5, 5]" + ], + "type": "Scan" } ] }