diff options
author | ssmike <ssmike@ydb.tech> | 2023-05-25 18:33:38 +0300 |
---|---|---|
committer | ssmike <ssmike@ydb.tech> | 2023-05-25 18:33:38 +0300 |
commit | 575a3eb78d1a0ea3c29c9fecbac5364b503c3ee7 (patch) | |
tree | a22d90e53ffc633f79a4532608f61378d94064e5 | |
parent | f9c2bb739480bd61ba7ac3539dc65c22d295e069 (diff) | |
download | ydb-575a3eb78d1a0ea3c29c9fecbac5364b503c3ee7.tar.gz |
Fix issues from 3792262
-rw-r--r-- | ydb/core/kqp/common/kqp_yql.cpp | 6 | ||||
-rw-r--r-- | ydb/core/kqp/common/kqp_yql.h | 2 | ||||
-rw-r--r-- | ydb/core/kqp/compile_service/kqp_compile_actor.cpp | 2 | ||||
-rw-r--r-- | ydb/core/kqp/compile_service/kqp_compile_service.cpp | 4 | ||||
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_executer_impl.h | 6 | ||||
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_partition_helper.cpp | 2 | ||||
-rw-r--r-- | ydb/core/kqp/executer_actor/kqp_partition_helper.h | 2 | ||||
-rw-r--r-- | ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp | 4 | ||||
-rw-r--r-- | ydb/core/kqp/provider/yql_kikimr_settings.h | 2 | ||||
-rw-r--r-- | ydb/core/kqp/query_compiler/kqp_query_compiler.cpp | 4 | ||||
-rw-r--r-- | ydb/core/kqp/ut/opt/kqp_ne_ut.cpp | 2 | ||||
-rw-r--r-- | ydb/core/protos/config.proto | 4 | ||||
-rw-r--r-- | ydb/core/protos/kqp_physical.proto | 2 |
13 files changed, 21 insertions, 21 deletions
diff --git a/ydb/core/kqp/common/kqp_yql.cpp b/ydb/core/kqp/common/kqp_yql.cpp index dfb523c203a..7a5a8417f14 100644 --- a/ydb/core/kqp/common/kqp_yql.cpp +++ b/ydb/core/kqp/common/kqp_yql.cpp @@ -162,7 +162,7 @@ TKqpReadTableSettings ParseInternal(const TCoNameValueTupleList& node) { settings.Sorted = true; } else if (name == TKqpReadTableSettings::SequentialSettingName) { YQL_ENSURE(tuple.Ref().ChildrenSize() == 2); - settings.SequentialHint = FromString<ui64>(tuple.Value().Cast<TCoAtom>().Value()); + settings.SequentialInFlight = FromString<ui64>(tuple.Value().Cast<TCoAtom>().Value()); } else { YQL_ENSURE(false, "Unknown KqpReadTable setting name '" << name << "'"); } @@ -231,13 +231,13 @@ NNodes::TCoNameValueTupleList TKqpReadTableSettings::BuildNode(TExprContext& ctx .Done()); } - if (SequentialHint) { + if (SequentialInFlight) { settings.emplace_back( Build<TCoNameValueTuple>(ctx, pos) .Name() .Build(SequentialSettingName) .Value<TCoAtom>() - .Value(ToString(*SequentialHint)) + .Value(ToString(*SequentialInFlight)) .Build() .Done()); } diff --git a/ydb/core/kqp/common/kqp_yql.h b/ydb/core/kqp/common/kqp_yql.h index 78454d78b1b..5ba9190ec56 100644 --- a/ydb/core/kqp/common/kqp_yql.h +++ b/ydb/core/kqp/common/kqp_yql.h @@ -56,7 +56,7 @@ struct TKqpReadTableSettings { TExprNode::TPtr ItemsLimit; bool Reverse = false; bool Sorted = false; - TMaybe<ui64> SequentialHint; + TMaybe<ui64> SequentialInFlight; void AddSkipNullKey(const TString& key); void SetItemsLimit(const TExprNode::TPtr& expr) { ItemsLimit = expr; } diff --git a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp index c087db13806..7158e4ea902 100644 --- a/ydb/core/kqp/compile_service/kqp_compile_actor.cpp +++ b/ydb/core/kqp/compile_service/kqp_compile_actor.cpp @@ -367,7 +367,7 @@ void ApplyServiceConfig(TKikimrConfiguration& kqpConfig, const TTableServiceConf kqpConfig.EnableKqpScanQueryStreamIdxLookupJoin = serviceConfig.GetEnableKqpScanQueryStreamIdxLookupJoin(); kqpConfig.EnablePredicateExtractForDataQuery = serviceConfig.GetEnablePredicateExtractForDataQueries(); kqpConfig.EnablePredicateExtractForScanQuery = serviceConfig.GetEnablePredicateExtractForScanQueries(); - kqpConfig.EnableSequentialHints = serviceConfig.GetEnableSequentialHints(); + kqpConfig.EnableSequentialReads = serviceConfig.GetEnableSequentialReads(); kqpConfig.EnableKqpImmediateEffects = serviceConfig.GetEnableKqpImmediateEffects(); } diff --git a/ydb/core/kqp/compile_service/kqp_compile_service.cpp b/ydb/core/kqp/compile_service/kqp_compile_service.cpp index 97646113fce..333d868ae91 100644 --- a/ydb/core/kqp/compile_service/kqp_compile_service.cpp +++ b/ydb/core/kqp/compile_service/kqp_compile_service.cpp @@ -371,7 +371,7 @@ private: bool enableKqpDataQueryPredicateExtract = Config.GetEnablePredicateExtractForDataQueries(); bool enableKqpScanQueryPredicateExtract = Config.GetEnablePredicateExtractForScanQueries(); - bool enableSequentialHints = Config.GetEnableSequentialHints(); + bool enableSequentialReads = Config.GetEnableSequentialReads(); bool defaultSyntaxVersion = Config.GetSqlVersion(); Config.Swap(event.MutableConfig()->MutableTableServiceConfig()); @@ -388,7 +388,7 @@ private: Config.GetEnableKqpScanQuerySourceRead() != enableKqpScanQuerySourceRead || Config.GetEnablePredicateExtractForDataQueries() != enableKqpDataQueryPredicateExtract || Config.GetEnablePredicateExtractForScanQueries() != enableKqpScanQueryPredicateExtract || - Config.GetEnableSequentialHints() != enableSequentialHints) { + Config.GetEnableSequentialReads() != enableSequentialReads) { LOG_NOTICE_S(*TlsActivationContext, NKikimrServices::KQP_COMPILE_SERVICE, "Iterator read flags was changed. StreamLookup from " << enableKqpDataQueryStreamLookup << diff --git a/ydb/core/kqp/executer_actor/kqp_executer_impl.h b/ydb/core/kqp/executer_actor/kqp_executer_impl.h index ca3e2071099..70fff3396d8 100644 --- a/ydb/core/kqp/executer_actor/kqp_executer_impl.h +++ b/ydb/core/kqp/executer_actor/kqp_executer_impl.h @@ -805,10 +805,10 @@ protected: input.SourceType = NYql::KqpReadRangesSourceName; }; - if (source.GetSequentialAccessHint()) { - auto shardInfo = MakeFakePartition(GetTableKeys(), source, stageInfo, HolderFactory(), TypeEnv()); + if (source.GetSequentialInFlightShards()) { + auto shardInfo = MakeVirtualTablePartition(GetTableKeys(), source, stageInfo, HolderFactory(), TypeEnv()); if (shardInfo.KeyReadRanges) { - addPartiton({}, shardInfo, source.GetSequentialAccessHint()); + addPartiton({}, shardInfo, source.GetSequentialInFlightShards()); return {}; } else { return 0; diff --git a/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp b/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp index d1790f20c94..896a1e79074 100644 --- a/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp +++ b/ydb/core/kqp/executer_actor/kqp_partition_helper.cpp @@ -588,7 +588,7 @@ TVector<TSerializedPointOrRange> ExtractRanges(const TKqpTableKeys& tableKeys, return ranges; } -TShardInfo MakeFakePartition(const TKqpTableKeys& tableKeys, +TShardInfo MakeVirtualTablePartition(const TKqpTableKeys& tableKeys, const NKqpProto::TKqpReadRangesSource& source, const TStageInfo& stageInfo, const NMiniKQL::THolderFactory& holderFactory, const NMiniKQL::TTypeEnvironment& typeEnv) { diff --git a/ydb/core/kqp/executer_actor/kqp_partition_helper.h b/ydb/core/kqp/executer_actor/kqp_partition_helper.h index 47e599074c6..ffca6633cdb 100644 --- a/ydb/core/kqp/executer_actor/kqp_partition_helper.h +++ b/ydb/core/kqp/executer_actor/kqp_partition_helper.h @@ -66,7 +66,7 @@ THashMap<ui64, TShardInfo> PrunePartitions(const TKqpTableKeys& tableKeys, const NKqpProto::TKqpPhyOpLookup& lookup, const TStageInfo& stageInfo, const NMiniKQL::THolderFactory& holderFactory, const NMiniKQL::TTypeEnvironment& typeEnv); -TShardInfo MakeFakePartition(const TKqpTableKeys& tableKeys, +TShardInfo MakeVirtualTablePartition(const TKqpTableKeys& tableKeys, const NKqpProto::TKqpReadRangesSource& source, const TStageInfo& stageInfo, const NMiniKQL::THolderFactory& holderFactory, const NMiniKQL::TTypeEnvironment& typeEnv); diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp index 56139dc31f4..77f5f426d0c 100644 --- a/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp +++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_limit.cpp @@ -37,8 +37,8 @@ TExprBase KqpApplyLimitToReadTable(TExprBase node, TExprContext& ctx, const TKqp return node; // already set? } - if (kqpCtx.Config.Get()->EnableSequentialHints) { - settings.SequentialHint = 1; + if (kqpCtx.Config.Get()->EnableSequentialReads) { + settings.SequentialInFlight = 1; } TMaybeNode<TExprBase> limitValue; diff --git a/ydb/core/kqp/provider/yql_kikimr_settings.h b/ydb/core/kqp/provider/yql_kikimr_settings.h index 4e3366023c4..a6f69d3f885 100644 --- a/ydb/core/kqp/provider/yql_kikimr_settings.h +++ b/ydb/core/kqp/provider/yql_kikimr_settings.h @@ -141,7 +141,7 @@ struct TKikimrConfiguration : public TKikimrSettings, public NCommon::TSettingDi bool EnablePredicateExtractForScanQuery = true; bool EnablePredicateExtractForDataQuery = false; bool EnableKqpImmediateEffects = false; - bool EnableSequentialHints = false; + bool EnableSequentialReads = false; }; } diff --git a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp index eb8ae949f65..ee3487a9592 100644 --- a/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp +++ b/ydb/core/kqp/query_compiler/kqp_query_compiler.cpp @@ -847,8 +847,8 @@ private: readProto.SetSorted(readSettings.Sorted); YQL_ENSURE(readSettings.SkipNullKeys.empty()); - if (readSettings.SequentialHint) { - readProto.SetSequentialAccessHint(*readSettings.SequentialHint); + if (readSettings.SequentialInFlight) { + readProto.SetSequentialInFlightShards(*readSettings.SequentialInFlight); } auto ranges = settings.RangesExpr().template Maybe<TCoParameter>(); diff --git a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp index 16da405a897..c36668d258f 100644 --- a/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp +++ b/ydb/core/kqp/ut/opt/kqp_ne_ut.cpp @@ -3669,7 +3669,7 @@ Y_UNIT_TEST_SUITE(KqpNewEngine) { NKikimrConfig::TAppConfig appConfig; appConfig.MutableTableServiceConfig()->SetEnableKqpDataQuerySourceRead(true); appConfig.MutableTableServiceConfig()->SetEnablePredicateExtractForDataQueries(true); - appConfig.MutableTableServiceConfig()->SetEnableSequentialHints(true); + appConfig.MutableTableServiceConfig()->SetEnableSequentialReads(true); settings.SetDomainRoot(KikimrDefaultUtDomainRoot); settings.SetAppConfig(appConfig); diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 0fee9d0c905..e90ae3257a6 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -1286,8 +1286,8 @@ message TTableServiceConfig { optional bool EnableKqpScanQueryStreamIdxLookupJoin = 35 [default = false]; optional bool EnablePredicateExtractForScanQueries = 36 [default = true]; optional bool EnablePredicateExtractForDataQueries = 37 [default = true]; - optional bool EnableSequentialHints = 38 [default = false]; - optional bool EnableKqpImmediateEffects = 39 [default = true]; + optional bool EnableSequentialReads = 38 [default = false]; + optional bool EnableKqpImmediateEffects = 39 [default = false]; }; // Config describes immediate controls and allows diff --git a/ydb/core/protos/kqp_physical.proto b/ydb/core/protos/kqp_physical.proto index ba80ae6940c..3d9aa849c5a 100644 --- a/ydb/core/protos/kqp_physical.proto +++ b/ydb/core/protos/kqp_physical.proto @@ -281,7 +281,7 @@ message TKqpReadRangesSource { } repeated string SkipNullKeys = 8; - uint64 SequentialAccessHint = 9; + uint64 SequentialInFlightShards = 9; } message TKqpExternalSource { |