diff options
author | pavelvelikhov <pavelvelikhov@yandex-team.com> | 2023-07-20 15:17:52 +0300 |
---|---|---|
committer | pavelvelikhov <pavelvelikhov@yandex-team.com> | 2023-07-20 15:17:52 +0300 |
commit | 629dca0f6d0e10c2a76afdebaa75bd9042b8eaaa (patch) | |
tree | da3bc3193002fe07913ac4be788026b39bb08ae2 | |
parent | 305bcca70bdccb97a59e135cb1d87e8a2a06bb7c (diff) | |
download | ydb-629dca0f6d0e10c2a76afdebaa75bd9042b8eaaa.tar.gz |
KIKIMR-15081: Push TopSort below renaming FlatMap
Pushing TopSort below renaming FlatMap
121 files changed, 561 insertions, 252 deletions
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp index dafc1368488..dd887361f5a 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log.cpp @@ -38,6 +38,7 @@ public: AddHandler(0, &TCoCalcOverWindowBase::Match, HNDL(ExpandWindowFunctions)); AddHandler(0, &TCoCalcOverWindowGroup::Match, HNDL(ExpandWindowFunctions)); AddHandler(0, &TCoFlatMap::Match, HNDL(LatePushExtractedPredicateToReadTable)); + AddHandler(0, &TCoTopSort::Match, HNDL(RewriteTopSortOverRename)); AddHandler(0, &TCoTop::Match, HNDL(RewriteTopSortOverIndexRead)); AddHandler(0, &TCoTopSort::Match, HNDL(RewriteTopSortOverIndexRead)); AddHandler(0, &TCoTake::Match, HNDL(RewriteTakeOverIndexRead)); @@ -140,6 +141,12 @@ protected: return output; } + TMaybeNode<TExprBase> RewriteTopSortOverRename(TExprBase node, TExprContext& ctx) { + TExprBase output = KqpRewriteTopSortOverRename(node, ctx); + DumpAppliedRule("RewriteTopSortOverRename", node.Ptr(), output.Ptr(), ctx); + return output; + } + TMaybeNode<TExprBase> RewriteTopSortOverIndexRead(TExprBase node, TExprContext& ctx, const TGetParents& getParents) { TExprBase output = KqpRewriteTopSortOverIndexRead(node, ctx, KqpCtx, *getParents()); DumpAppliedRule("RewriteTopSortOverIndexRead", node.Ptr(), output.Ptr(), ctx); diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_indexes.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_indexes.cpp index ddaf1837317..c843c1a13d1 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_indexes.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_indexes.cpp @@ -5,6 +5,8 @@ #include <ydb/library/yql/dq/opt/dq_opt_phy.h> #include <ydb/library/yql/core/yql_opt_utils.h> +#include <util/generic/hash.h> + namespace NKikimr::NKqp::NOpt { using namespace NYql; @@ -428,6 +430,126 @@ bool CanPushFlatMap(const TCoFlatMapBase& flatMap, const TKikimrTableDescription return true; } +// Check if the TopSort key selectors are a single member or members only list +bool IsMemberOnlyKeySelector(const TCoLambda& lambda) { + // If its a single selector: + if (lambda.Body().Maybe<TCoMember>()) { + // Check that the member is applied to lambda argument + auto member = lambda.Body().Cast<TCoMember>(); + if (member.Struct().Raw() != lambda.Args().Arg(0).Raw()) { + return false; + } + return true; + } else if (lambda.Body().Maybe<TExprList>()) { + for (auto item : lambda.Body().Cast<TExprList>()) { + if (!item.Maybe<TCoMember>()) { + return false; + } + // Check that the member is applied to lambda argument + auto member = item.Cast<TCoMember>(); + if (member.Struct().Raw() != lambda.Args().Arg(0).Raw()) { + return false; + } + } + return true; + } + + return false; +} + +// Construct a new lambda with renamed attributes based on the mapping +TCoLambda RenameKeySelector(const TCoLambda& lambda, TExprContext& ctx, const THashMap<TString,TString>& map) { + // If its single member lambda body + if (lambda.Body().Maybe<TCoMember>()) { + auto attrRef = lambda.Body().Cast<TCoMember>().Name().StringValue(); + auto mapped = map.Value(attrRef,attrRef); + + return Build<TCoLambda>(ctx, lambda.Pos()) + .Args({"argument"}) + .Body<TCoMember>() + .Struct("argument") + .Name().Build(mapped) + .Build() + .Done(); + } + // Else its a list of members lambda body + else { + TCoArgument arg = Build<TCoArgument>(ctx, lambda.Pos()) + .Name("Arg") + .Done(); + + TVector<TExprBase> members; + + for (auto item : lambda.Body().Cast<TExprList>()) { + auto attrRef = item.Cast<TCoMember>().Name().StringValue(); + auto mapped = map.Value(attrRef,attrRef); + + auto member = Build<TCoMember>(ctx, lambda.Pos()) + .Struct(arg) + .Name().Build(mapped) + .Done(); + members.push_back(member); + } + + return Build<TCoLambda>(ctx, lambda.Pos()) + .Args({arg}) + .Body<TExprList>() + .Add(members) + .Build() + .Done(); + } +} + + +// If we have a top-sort over rename, we can push it throught is, so that the +// RewriteTopSortOverIndexRead rule can fire next. If the flatmap renames some of the sort +// attributes, we need to use the original names in the top-sort. When pushing TopSort below +// FlatMap, we change FlatMap to OrderedFlatMap to preserve the order of its input. +TExprBase KqpRewriteTopSortOverRename(const TExprBase& node, TExprContext& ctx) { + + // Check that we have a top-sort and a flat-map directly below it + if(!node.Maybe<TCoTopBase>()) { + return node; + } + + const auto topBase = node.Maybe<TCoTopBase>().Cast(); + + if (!topBase.Input().Maybe<TCoFlatMap>()) { + return node; + } + + auto flatMap = topBase.Input().Maybe<TCoFlatMap>().Cast(); + + // Check that the flat-map is a rename and compute the mapping + TExprNode::TPtr structNode; + THashMap<TString, TString> renameMap; + if (!IsRenameFlatMapWithMapping(flatMap, structNode, renameMap)) { + return node; + } + + // Check that the TopSort selector list is member only + if (!IsMemberOnlyKeySelector(topBase.KeySelectorLambda())) { + return node; + } + + // Rename the attributes in sort key selector of the sort + TCoLambda newKeySelector = RenameKeySelector(topBase.KeySelectorLambda(), ctx, renameMap); + + // Swap top sort and rename operators + auto flatMapInput = Build<TCoTopBase>(ctx, node.Pos()) + .CallableName(node.Ref().Content()) + .Input(flatMap.Input()) + .KeySelectorLambda(newKeySelector) + .SortDirections(topBase.SortDirections()) + .Count(topBase.Count()) + .Done(); + + return Build<TCoOrderedFlatMap>(ctx, node.Pos()) + .Input(flatMapInput) + .Lambda(ctx.DeepCopyLambda(flatMap.Lambda().Ref())) + .Done(); +} + // The index and main table have same number of rows, so we can push a copy of TCoTopSort or TCoTake // through TKqlLookupTable. // The simplest way is to match TopSort or Take over TKqlReadTableIndex. 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 02d83481899..24db774faf9 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_rules.h @@ -47,6 +47,8 @@ NYql::NNodes::TExprBase KqpRewriteLookupTable(const NYql::NNodes::TExprBase& nod NYql::NNodes::TExprBase KqpRewriteTopSortOverIndexRead(const NYql::NNodes::TExprBase& node, NYql::TExprContext&, const TKqpOptimizeContext& kqpCtx, const NYql::TParentsMap& parentsMap); +NYql::NNodes::TExprBase KqpRewriteTopSortOverRename(const NYql::NNodes::TExprBase& node, NYql::TExprContext& ctx); + NYql::NNodes::TExprBase KqpRewriteTakeOverIndexRead(const NYql::NNodes::TExprBase& node, NYql::TExprContext&, const TKqpOptimizeContext& kqpCtx, const NYql::TParentsMap& parentsMap); diff --git a/ydb/library/yql/core/yql_opt_utils.cpp b/ydb/library/yql/core/yql_opt_utils.cpp index 578a4795b8f..20df4f40581 100644 --- a/ydb/library/yql/core/yql_opt_utils.cpp +++ b/ydb/library/yql/core/yql_opt_utils.cpp @@ -157,22 +157,69 @@ bool IsListReorder(const TExprNode& node) { return node.IsCallable({"Sort", "Reverse"}); } +// Check if the flat map is a simple rename flat map bool IsRenameFlatMap(const NNodes::TCoFlatMapBase& node, TExprNode::TPtr& structNode) { + auto lambda = node.Lambda(); if (!IsJustOrSingleAsList(lambda.Body().Ref())) { return false; } structNode = lambda.Body().Ref().Child(0); - if (!structNode->IsCallable("AsStruct")) { + + auto asStruct = TExprBase(structNode); + if (!asStruct.Maybe<TCoAsStruct>()) { + return false; + } + + for (auto child : asStruct.Cast<TCoAsStruct>()) { + + if (!child.Item(1).Maybe<TCoMember>()) { + return false; + } + + auto member = child.Item(1).Cast<TCoMember>(); + if(member.Struct().Raw() != lambda.Args().Arg(0).Raw()) { + return false; + } + } + + return true; +} + +// Check if the flat map is a simple rename flat map and compute the mapping from new names to original ones +bool IsRenameFlatMapWithMapping(const NNodes::TCoFlatMapBase& node, TExprNode::TPtr& structNode, + THashMap<TString, TString> & mapping) { + + auto lambda = node.Lambda(); + if (!IsJustOrSingleAsList(lambda.Body().Ref())) { + return false; + } + + structNode = lambda.Body().Ref().Child(0); + + auto asStruct = TExprBase(structNode); + if (!asStruct.Maybe<TCoAsStruct>()) { return false; } - for (auto& child : structNode->Children()) { - auto item = child->Child(1); - if (!item->IsCallable("Member") || item->Child(0) != lambda.Args().Arg(0).Raw()) { + for (auto child : asStruct.Cast<TCoAsStruct>()) { + + if (!child.Item(1).Maybe<TCoMember>()) { + return false; + } + + auto member = child.Item(1).Cast<TCoMember>(); + if(member.Struct().Raw() != lambda.Args().Arg(0).Raw()) { return false; } + + auto to = child.Item(0).Cast<TCoAtom>(); + auto from = member.Name(); + + if (to != from){ + mapping[to.StringValue()] = from.StringValue(); + } } return true; diff --git a/ydb/library/yql/core/yql_opt_utils.h b/ydb/library/yql/core/yql_opt_utils.h index 08eabc91f89..e6ca839e0d5 100644 --- a/ydb/library/yql/core/yql_opt_utils.h +++ b/ydb/library/yql/core/yql_opt_utils.h @@ -19,6 +19,7 @@ bool IsPredicateFlatMap(const TExprNode& node); bool IsFilterFlatMap(const NNodes::TCoLambda& lambda); bool IsListReorder(const TExprNode& node); bool IsRenameFlatMap(const NNodes::TCoFlatMapBase& node, TExprNode::TPtr& structNode); +bool IsRenameFlatMapWithMapping(const NNodes::TCoFlatMapBase& node, TExprNode::TPtr& structNode, THashMap<TString, TString>& renameMap); bool IsPassthroughFlatMap(const NNodes::TCoFlatMapBase& flatmap, TMaybe<THashSet<TStringBuf>>* passthroughFields, bool analyzeJustMember = false); bool IsPassthroughLambda(const NNodes::TCoLambda& lambda, TMaybe<THashSet<TStringBuf>>* passthroughFields, bool analyzeJustMember = false); bool IsTablePropsDependent(const TExprNode& node); diff --git a/ydb/tests/functional/canonical/canondata/result.json b/ydb/tests/functional/canonical/canondata/result.json index 38f24891f75..0c5bcc4273f 100644 --- a/ydb/tests/functional/canonical/canondata/result.json +++ b/ydb/tests/functional/canonical/canondata/result.json @@ -116,6 +116,26 @@ "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_select_using_index_only.sql-result_sets_/index_select_using_index_only.sql.results" } }, + "test_sql.TestCanonicalFolder1.test_case[index/topsort_index_with_nonselector_aliases.sql-plan]": { + "plan": { + "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-plan_/index_topsort_index_with_nonselector_aliases.sql.plan" + } + }, + "test_sql.TestCanonicalFolder1.test_case[index/topsort_index_with_nonselector_aliases.sql-result_sets]": { + "result_sets": { + "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-result_sets_/index_topsort_index_with_nonselector_aliases.sql.results" + } + }, + "test_sql.TestCanonicalFolder1.test_case[index/topsort_index_with_selector_aliases.sql-plan]": { + "plan": { + "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-plan_/index_topsort_index_with_selector_aliases.sql.plan" + } + }, + "test_sql.TestCanonicalFolder1.test_case[index/topsort_index_with_selector_aliases.sql-result_sets]": { + "result_sets": { + "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-result_sets_/index_topsort_index_with_selector_aliases.sql.results" + } + }, "test_sql.TestCanonicalFolder1.test_case[index_predicate_point.sql-plan]": { "plan": { "uri": "file://test_sql.TestCanonicalFolder1.test_case_index_predicate_point.sql-plan_/index_predicate_point.sql.plan" diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-plan_/index_topsort_index_with_nonselector_aliases.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-plan_/index_topsort_index_with_nonselector_aliases.sql.plan new file mode 100644 index 00000000000..52d567d81a4 --- /dev/null +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-plan_/index_topsort_index_with_nonselector_aliases.sql.plan @@ -0,0 +1,41 @@ +{ + "meta": { + "type": "query", + "version": "0.2" + }, + "tables": [ + { + "name": "/local/base_index_topsort_index_with_nonselector_aliases_sql_plan/NewTableWithIndex", + "reads": [ + { + "columns": [ + "Index1A", + "Index1B", + "Value" + ], + "type": "Lookup" + } + ] + }, + { + "name": "/local/base_index_topsort_index_with_nonselector_aliases_sql_plan/NewTableWithIndex/NewIndex1/indexImplTable", + "reads": [ + { + "columns": [ + "Key1", + "Index1A", + "Index1B" + ], + "limit": "2", + "reverse": true, + "scan_by": [ + "Index1A (-\u221e, +\u221e)", + "Index1B (-\u221e, +\u221e)", + "Key1 (-\u221e, +\u221e)" + ], + "type": "FullScan" + } + ] + } + ] +}
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-result_sets_/index_topsort_index_with_nonselector_aliases.sql.results b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-result_sets_/index_topsort_index_with_nonselector_aliases.sql.results new file mode 100644 index 00000000000..5825bcacc69 --- /dev/null +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_nonselector_aliases.sql-result_sets_/index_topsort_index_with_nonselector_aliases.sql.results @@ -0,0 +1,3 @@ +[ + [] +]
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-plan_/index_topsort_index_with_selector_aliases.sql.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-plan_/index_topsort_index_with_selector_aliases.sql.plan new file mode 100644 index 00000000000..ea5a82d5f07 --- /dev/null +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-plan_/index_topsort_index_with_selector_aliases.sql.plan @@ -0,0 +1,41 @@ +{ + "meta": { + "type": "query", + "version": "0.2" + }, + "tables": [ + { + "name": "/local/base_index_topsort_index_with_selector_aliases_sql_plan/NewTableWithIndex", + "reads": [ + { + "columns": [ + "Index1A", + "Index1B", + "Value" + ], + "type": "Lookup" + } + ] + }, + { + "name": "/local/base_index_topsort_index_with_selector_aliases_sql_plan/NewTableWithIndex/NewIndex1/indexImplTable", + "reads": [ + { + "columns": [ + "Key1", + "Index1A", + "Index1B" + ], + "limit": "2", + "reverse": true, + "scan_by": [ + "Index1A (-\u221e, +\u221e)", + "Index1B (-\u221e, +\u221e)", + "Key1 (-\u221e, +\u221e)" + ], + "type": "FullScan" + } + ] + } + ] +}
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-result_sets_/index_topsort_index_with_selector_aliases.sql.results b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-result_sets_/index_topsort_index_with_selector_aliases.sql.results new file mode 100644 index 00000000000..5825bcacc69 --- /dev/null +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_index_topsort_index_with_selector_aliases.sql-result_sets_/index_topsort_index_with_selector_aliases.sql.results @@ -0,0 +1,3 @@ +[ + [] +]
\ No newline at end of file diff --git a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan index 7768dd0187b..db6133f8d42 100644 --- a/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan +++ b/ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan @@ -129,7 +129,7 @@ "Node Type": "Merge", "SortColumns": [ "a.Group (Asc)", - "a.Count (Asc)", + "a.Count0 (Asc)", "t.Value (Asc)" ], "PlanNodeType": "Connection" diff --git a/ydb/tests/functional/canonical/sql/index/topsort_index_with_nonselector_aliases.sql b/ydb/tests/functional/canonical/sql/index/topsort_index_with_nonselector_aliases.sql new file mode 100644 index 00000000000..37baa9c4e86 --- /dev/null +++ b/ydb/tests/functional/canonical/sql/index/topsort_index_with_nonselector_aliases.sql @@ -0,0 +1,8 @@ +--!syntax_v1 +SELECT +t.Value as Value_alias, +t.Index1A, +t.Index1B +from NewTableWithIndex view NewIndex1 as t +order by t.Index1A desc, t.Index1B desc +limit 2; diff --git a/ydb/tests/functional/canonical/sql/index/topsort_index_with_selector_aliases.sql b/ydb/tests/functional/canonical/sql/index/topsort_index_with_selector_aliases.sql new file mode 100644 index 00000000000..b1afe42e453 --- /dev/null +++ b/ydb/tests/functional/canonical/sql/index/topsort_index_with_selector_aliases.sql @@ -0,0 +1,8 @@ +--!syntax_v1 +SELECT +t.Value as Value_alias, +t.Index1A as Index1A_alias, +t.Index1B +from NewTableWithIndex view NewIndex1 as t +order by t.Index1A_alias desc, t.Index1B desc +limit 2; diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-10 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-10 index 572a1ef7660..4dd50b654df 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-10 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-10 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -165,7 +165,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-11 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-11 index 62095a887d2..a189481fd34 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-11 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-11 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$10.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -171,7 +171,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-12 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-12 index fe1849451ae..54587e65a1a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-12 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-12 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -134,7 +134,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-13 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-13 index d68a89d48b0..35a7b579e9d 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-13 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-13 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -165,7 +165,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-14 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-14 index 58171605dd5..3296be534f3 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-14 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-14 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$10.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -139,7 +139,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-15 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-15 index 02388af9d5e..21c9158ebcb 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-15 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-15 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -99,7 +99,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-16 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-16 index 76c7cd67706..c41ff4d562d 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-16 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-16 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-18 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-18 index 72680c9358f..92797c31852 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-18 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-18 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$15.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -109,7 +109,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-21 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-21 index 8c07b5e5d7e..d9b91851d75 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-21 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-21 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$11.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -193,7 +193,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-22 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-22 index f6bf140a78d..d24dc9976a8 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-22 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-22 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$20.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -556,7 +556,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-30 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-30 index 8b2e1314f6f..ed4aea1dd58 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-30 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-30 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$17.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -148,7 +148,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-31 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-31 index 6bb92239bd2..6b004f765cf 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-31 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-31 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$17.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -148,7 +148,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-32 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-32 index ddd1182f668..516486c5383 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-32 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-32 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$15.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -112,7 +112,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-33 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-33 index 03cca151443..44549123269 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-33 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-33 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -99,7 +99,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-34 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-34 index 3603dc9d4f1..2633f6a17bd 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-34 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-34 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-36 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-36 index 9f12a31c364..f484fa3ca48 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-36 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-36 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$13.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -283,7 +283,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-37 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-37 index a4a41134634..2a6821caf51 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-37 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-37 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$13.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -283,7 +283,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-38 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-38 index e8b363119ca..1b589d36618 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-38 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-38 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$12.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -303,7 +303,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-39 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-39 index b436a2a847f..19d43b73d32 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-39 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-39 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$18.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -229,7 +229,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-40 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-40 index 1509c231011..83e80eaf347 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-40 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-40 @@ -54,7 +54,7 @@ { "Limit": "10 + 100", "Name": "TopSort", - "TopSortBy": "$13.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -261,7 +261,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-41 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-41 index 6275c503d76..db6879c2124 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-41 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-41 @@ -54,7 +54,7 @@ { "Limit": "10 + 10000", "Name": "TopSort", - "TopSortBy": "$15.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -308,7 +308,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-42 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-42 index 387c2af0280..a128930e401 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-42 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-42 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$16.Minute" + "TopSortBy": "argument.Minute" }, { "Name": "Aggregate" diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-7 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-7 index 3a2947ec13a..77d0b94f7cc 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-7 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-7 @@ -35,7 +35,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "$9.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -134,7 +134,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-8 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-8 index 6668b0bbabd..951d70a2729 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-8 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-8 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$7.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -130,7 +130,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-9 b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-9 index b3d69e9a237..2d48e1a7bd7 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-9 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_column_/queries-original-plan-column-9 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$18.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -220,7 +220,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-10 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-10 index 4dcecdd0a92..76d51825669 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-10 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-10 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -117,7 +117,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-11 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-11 index 38e4edd7a7b..8cb662f1059 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-11 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-11 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$11.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -120,7 +120,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-12 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-12 index d748d399c20..f2ca450ac48 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-12 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-12 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$10.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -89,7 +89,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-13 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-13 index 9071369a64b..1df724b461f 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-13 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-13 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -117,7 +117,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-14 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-14 index 6150ede9c39..865b37dde79 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-14 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-14 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$11.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -91,7 +91,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-15 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-15 index 4ec1608fefa..838bc92145a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-15 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-15 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -85,7 +85,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-16 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-16 index 0ef4c678808..00b9500980f 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-16 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-16 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -87,7 +87,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-18 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-18 index 883ad3aa1de..aee84b4289c 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-18 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-18 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$15.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -89,7 +89,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-21 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-21 index 828f5f7475f..d961a9ded10 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-21 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-21 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$12.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -90,7 +90,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-22 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-22 index 68a67e8908d..95ec0d5a414 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-22 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-22 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$21.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -182,7 +182,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-30 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-30 index 5cdac8c749b..2e761d1a843 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-30 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-30 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$18.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -94,7 +94,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-31 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-31 index daa9ee6255d..966e85a983d 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-31 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-31 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$18.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -94,7 +94,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-32 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-32 index c419ae7ba5d..6c7105bac0e 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-32 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-32 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$15.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -89,7 +89,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-33 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-33 index 26d4b74dc65..be73bea82de 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-33 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-33 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$8.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -85,7 +85,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-34 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-34 index bc8628be9d4..63c26656949 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-34 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-34 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$9.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -87,7 +87,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-36 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-36 index 3ee1efee163..87c50c0e72f 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-36 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-36 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$14.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -93,7 +93,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-37 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-37 index 6ce73aa9ab5..cc2509b280a 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-37 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-37 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$14.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -93,7 +93,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-38 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-38 index 7d7d3207953..b34dffcd23f 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-38 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-38 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$13.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -113,7 +113,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-39 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-39 index cc25390ed5a..a2b2472dd68 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-39 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-39 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$19.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -119,7 +119,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-40 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-40 index fb38ae21817..f5de3fffecb 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-40 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-40 @@ -54,7 +54,7 @@ { "Limit": "10 + 100", "Name": "TopSort", - "TopSortBy": "$14.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -114,7 +114,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-41 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-41 index f61ea3179eb..880930b1bf2 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-41 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-41 @@ -54,7 +54,7 @@ { "Limit": "10 + 10000", "Name": "TopSort", - "TopSortBy": "$16.PageViews" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -115,7 +115,7 @@ } ], "SortColumns": [ - "PageViews (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-42 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-42 index 1a97e31999c..3e5d43553bd 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-42 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-42 @@ -54,7 +54,7 @@ { "Limit": "10 + 1000", "Name": "TopSort", - "TopSortBy": "$17.Minute" + "TopSortBy": "argument.Minute" }, { "Name": "Aggregate" diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-7 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-7 index a97e54dfe71..960a2cbc60b 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-7 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-7 @@ -35,7 +35,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "$10.cnt" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -89,7 +89,7 @@ } ], "SortColumns": [ - "cnt (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-8 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-8 index 3a2f6280e31..0ba44a335d0 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-8 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-8 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$7.u" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -113,7 +113,7 @@ } ], "SortColumns": [ - "u (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-9 b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-9 index 17bc182f5f0..3f4ef67d7c2 100644 --- a/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-9 +++ b/ydb/tests/functional/clickbench/canondata/test.test_plans_row_/queries-original-plan-row-9 @@ -35,7 +35,7 @@ { "Limit": "10", "Name": "TopSort", - "TopSortBy": "$18.c" + "TopSortBy": "argument.Count0" }, { "Name": "Aggregate" @@ -174,7 +174,7 @@ } ], "SortColumns": [ - "c (Desc)" + "Count0 (Desc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan index b5a9a2b1c9b..810fc864b2a 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_1.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.a_y" + "TopSortBy": "argument.qr.y" }, { "Name": "LeftJoin (MapJoin)" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "a_y (Asc)" + "qr.y (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan index f747777191c..db3fb367836 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_2.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.a_y" + "TopSortBy": "argument.a.y" }, { "Name": "LeftJoin (MapJoin)" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "a_y (Asc)" + "a.y (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan index c3ecb78b37e..b453f3577b0 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_3.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.pv_x" + "TopSortBy": "argument.pv.x" }, { "Name": "LeftJoin (MapJoin)" @@ -105,7 +105,7 @@ } ], "SortColumns": [ - "pv_x (Asc)" + "pv.x (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan index 349ba0a0d86..9fd20e7b415 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_4.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.yy_pkyy" + "TopSortBy": "argument.yy.pkyy" }, { "Name": "LeftJoin (MapJoin)" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "yy_pkyy (Asc)" + "yy.pkyy (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan index 61ced69dd82..352bb9fa78a 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_2.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.q2" + "TopSortBy": "argument.t1.q2" }, { "Name": "Aggregate" @@ -130,7 +130,7 @@ } ], "SortColumns": [ - "q2 (Asc)" + "t1.q2 (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan index dc6db1b651e..f77aaefadd2 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_3.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.q2" + "TopSortBy": "argument.t1.q2" }, { "Name": "Aggregate" @@ -130,7 +130,7 @@ } ], "SortColumns": [ - "q2 (Asc)" + "t1.q2 (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan index 41540b5a601..83cea80ab74 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_4.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.q2" + "TopSortBy": "argument.t1.q2" }, { "Name": "Aggregate" @@ -159,7 +159,7 @@ } ], "SortColumns": [ - "q2 (Asc)" + "t1.q2 (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan index 9bb38c1d2b7..f3ade24018b 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join-group-by-with-null.test_/query_5.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.q2" + "TopSortBy": "argument.t1.q2" }, { "Name": "Aggregate" @@ -136,7 +136,7 @@ } ], "SortColumns": [ - "q2 (Asc)" + "t1.q2 (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan index 6291044cd43..e675ad7b500 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_1.plan @@ -117,8 +117,8 @@ } ], "SortColumns": [ - "i1q1 (Asc)", - "i1q2 (Asc)" + "i1.q1 (Asc)", + "i1.q2 (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan index 84030fa46e5..c9cb5dca0d8 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join0.test_/query_5.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.qq" + "TopSortBy": "argument.qr.qq" }, { "Name": "InnerJoin (MapJoin)" @@ -192,7 +192,7 @@ } ], "SortColumns": [ - "qq (Asc)" + "qr.qq (Asc)" ] } ] 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 2edac8b930f..65949c562e9 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 @@ -59,8 +59,8 @@ } ], "SortColumns": [ - "a (Asc)", - "e (Asc)" + "t1.i (Asc)", + "t2.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan index 09dce165e0e..0ee625dccf1 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_10.plan @@ -112,10 +112,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "t (Asc)", - "k (Asc)" + "J2_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J1_TBL.t (Asc)", + "J2_TBL.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan index d5e4d60196e..f0ae8f398c9 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_11.plan @@ -131,9 +131,9 @@ } ], "SortColumns": [ - "i (Asc)", - "k (Asc)", - "t (Asc)" + "J1_TBL.i (Asc)", + "J2_TBL.k (Asc)", + "J1_TBL.t (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan index c2d005173b6..baa4361b1e5 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_12.plan @@ -131,10 +131,10 @@ } ], "SortColumns": [ - "i (Asc)", - "k (Asc)", - "t (Asc)", - "j (Asc)" + "J1_TBL.i (Asc)", + "J2_TBL.k (Asc)", + "J1_TBL.t (Asc)", + "J1_TBL.j (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan index 22b030c73c6..c47093dbfd8 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_2.plan @@ -59,10 +59,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "t (Asc)", - "k (Asc)" + "J1_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J1_TBL.t (Asc)", + "J2_TBL.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan index 22b030c73c6..c47093dbfd8 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_3.plan @@ -59,10 +59,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "t (Asc)", - "k (Asc)" + "J1_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J1_TBL.t (Asc)", + "J2_TBL.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan index 7e6da1a0b29..40719fa88b1 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_4.plan @@ -116,8 +116,8 @@ } ], "SortColumns": [ - "b (Asc)", - "a (Asc)" + "t1.j (Asc)", + "t1.i (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan index 22b030c73c6..c47093dbfd8 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_5.plan @@ -59,10 +59,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "t (Asc)", - "k (Asc)" + "J1_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J1_TBL.t (Asc)", + "J2_TBL.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan index 94776ea8764..255a9e773df 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_6.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.i" + "TopSortBy": "argument.J1_TBL.i" }, { "Name": "InnerJoin (MapJoin)" @@ -115,7 +115,7 @@ } ], "SortColumns": [ - "i (Asc)" + "J1_TBL.i (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan index f6cdb8143ca..86425eb3b13 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_7.plan @@ -105,10 +105,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "k (Asc)", - "t (Asc)" + "J1_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J2_TBL.k (Asc)", + "J1_TBL.t (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan index f6cdb8143ca..86425eb3b13 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_8.plan @@ -105,10 +105,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "k (Asc)", - "t (Asc)" + "J1_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J2_TBL.k (Asc)", + "J1_TBL.t (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan index 09dce165e0e..0ee625dccf1 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_9.plan @@ -112,10 +112,10 @@ } ], "SortColumns": [ - "i (Asc)", - "j (Asc)", - "t (Asc)", - "k (Asc)" + "J2_TBL.i (Asc)", + "J1_TBL.j (Asc)", + "J1_TBL.t (Asc)", + "J2_TBL.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan index 874290f0d8e..66b8cf03438 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_2.plan @@ -30,7 +30,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.name" + "TopSortBy": "argument.s2.name" }, { "Name": "InnerJoin (MapJoin)" @@ -59,7 +59,7 @@ } ], "SortColumns": [ - "name (Asc)" + "s2.name (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan index 2fc4dbfec6d..8a16ebbd653 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join2.test_/query_3.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.name" + "TopSortBy": "argument.s2.name" }, { "Name": "LeftJoin (MapJoin)" @@ -105,7 +105,7 @@ } ], "SortColumns": [ - "name (Asc)" + "s2.name (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan index c128425eca1..e889f3d43ff 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_2.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.k" + "TopSortBy": "argument.p.k" }, { "Name": "LeftJoin (MapJoin)" @@ -104,7 +104,7 @@ } ], "SortColumns": [ - "k (Asc)" + "p.k (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan index 882616df4aa..4c8f6c36534 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join3.test_/query_8.plan @@ -102,10 +102,10 @@ } ], "SortColumns": [ - "x (Asc)", - "q1 (Asc)", - "q2 (Asc)", - "y (Asc)" + "ss1.x (Asc)", + "ss2.q1 (Asc)", + "ss2.q2 (Asc)", + "ss2.y (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan index c03800e421d..6dfc4f42fbb 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join4.test_/query_13.plan @@ -105,8 +105,8 @@ } ], "SortColumns": [ - "a1 (Asc)", - "b2 (Asc)" + "qrt1.a (Asc)", + "qrt2.b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan index 3a653a29640..432a3b562d7 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-window.test_/query_5.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.row_number" + "TopSortBy": "argument._yql_RowNumber0" }, { "Name": "Sort", @@ -114,7 +114,7 @@ } ], "SortColumns": [ - "row_number (Desc)" + "_yql_RowNumber0 (Desc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan index d3b9aa6aff4..ac7f87c7434 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_10.plan @@ -24,12 +24,11 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "" + "Name": "Limit" }, { "Name": "TableFullScan", @@ -37,6 +36,7 @@ "a", "b" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col1 (Asc)", - "col2 (Asc)" + "a (Asc)", + "b (Asc)" ] } ] @@ -77,6 +77,7 @@ "a", "b" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan index b2592b5d147..0ab563aab09 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_58.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.e" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "e (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan index 4111eaa6f7d..bd0bec6251a 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-1.test_/query_92.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.b" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan index f9ea3ae5f2f..a150af5e22c 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_13.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.e" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "e (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan index 4e55636a10a..5e4e7533c37 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_30.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan index 180db9532fc..b6a036641c7 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_84.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col2 (Asc)", - "col1 (Asc)" + "c (Asc)", + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan index 29fa867da9b..a03506d98ee 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-2.test_/query_88.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.c" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "c (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan index 3277f39541b..2e245a7ec09 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_12.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan index 3277f39541b..2e245a7ec09 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_24.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan index 2a107a38e72..2b08c633128 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-3.test_/query_69.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.c" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "c (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan index f545d62b9fd..7713145d9bb 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select1-4.test_/query_125.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col2 (Asc)", - "col1 (Asc)" + "c (Asc)", + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan index 63be93a4092..e5e5cdd2b36 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_120.plan @@ -24,18 +24,18 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "row.col1" + "Name": "Limit" }, { "Name": "TableFullScan", "ReadColumns": [ "a" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "a (Asc)" ] } ] @@ -74,6 +74,7 @@ "columns": [ "a" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan index b628d44f682..70d0d8f3f26 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-1.test_/query_35.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.e" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "e (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan index 65057430b27..7b8bb84f3c9 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_106.plan @@ -24,18 +24,18 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "row.col1" + "Name": "Limit" }, { "Name": "TableFullScan", "ReadColumns": [ "a" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "a (Asc)" ] } ] @@ -74,6 +74,7 @@ "columns": [ "a" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan index 010986fc512..20bf3bca2c4 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-3.test_/query_84.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.b" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan index 36f9c3e4668..bb3e927b40a 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_118.plan @@ -55,9 +55,9 @@ } ], "SortColumns": [ - "col1 (Asc)", - "col3 (Asc)", - "col2 (Asc)" + "d (Asc)", + "b (Asc)", + "a (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan index ff9bcb5d957..c1886843281 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_53.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan index 2cff09fbabe..8757395e865 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select2-4.test_/query_64.plan @@ -24,18 +24,18 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "row.col1" + "Name": "Limit" }, { "Name": "TableFullScan", "ReadColumns": [ "a" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "a (Asc)" ] } ] @@ -74,6 +74,7 @@ "columns": [ "a" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan index 5b6f882ffcb..f683d2fcf84 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_101.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.c" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "c (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan index 5b6f882ffcb..f683d2fcf84 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-11.test_/query_102.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.c" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "c (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan index 1b430ea6628..7ea7bbe5591 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_77.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col2 (Asc)", - "col1 (Asc)" + "c (Asc)", + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan index 2223cec0fa8..7d8136e9330 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-5.test_/query_78.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col1 (Asc)", - "col2 (Asc)" + "b (Asc)", + "c (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan index 64ac492e852..5d390a2a848 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_55.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan index 64ac492e852..5d390a2a848 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-7.test_/query_56.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.d" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "d (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan index d40fb00083c..e117117d502 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_64.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col2 (Asc)", - "col1 (Asc)" + "b (Asc)", + "e (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan index a8299b20a1b..1b0c7231907 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-8.test_/query_65.plan @@ -54,8 +54,8 @@ } ], "SortColumns": [ - "col1 (Asc)", - "col2 (Asc)" + "e (Asc)", + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan index 81f3b23c6fe..72c48eb2b1d 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_103.plan @@ -24,18 +24,18 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "row.col1" + "Name": "Limit" }, { "Name": "TableFullScan", "ReadColumns": [ "a" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "a (Asc)" ] } ] @@ -74,6 +74,7 @@ "columns": [ "a" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan index 81f3b23c6fe..72c48eb2b1d 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_104.plan @@ -24,18 +24,18 @@ "PlanNodeType": "Connection", "Plans": [ { - "Node Type": "TopSort-TableFullScan", + "Node Type": "Limit-TableFullScan", "Operators": [ { "Limit": "1001", - "Name": "TopSort", - "TopSortBy": "row.col1" + "Name": "Limit" }, { "Name": "TableFullScan", "ReadColumns": [ "a" ], + "ReadLimit": "1001", "ReadRanges": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "a (Asc)" ] } ] @@ -74,6 +74,7 @@ "columns": [ "a" ], + "limit": "1001", "scan_by": [ "a (-\u221e, +\u221e)", "b (-\u221e, +\u221e)", diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan index 45e87d90da4..db47dd790af 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_115.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.b" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "b (Asc)" ] } ] diff --git a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan index 45e87d90da4..db47dd790af 100644 --- a/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan +++ b/ydb/tests/functional/suite_tests/canondata/test_sql_logic.TestSQLLogic.test_sql_suite_plan-select3-9.test_/query_116.plan @@ -29,7 +29,7 @@ { "Limit": "1001", "Name": "TopSort", - "TopSortBy": "row.col1" + "TopSortBy": "argument.b" }, { "Name": "TableFullScan", @@ -53,7 +53,7 @@ } ], "SortColumns": [ - "col1 (Asc)" + "b (Asc)" ] } ] |