diff options
author | aneporada <aneporada@yandex-team.com> | 2024-11-12 16:12:00 +0300 |
---|---|---|
committer | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-12 22:40:28 +0300 |
commit | 4e4600bae44c02ba4a94c8f7a397a2c63c3cc235 (patch) | |
tree | a5c1e3d5f5cc178f622dafabb3f2b95bf05c7854 /yql/essentials | |
parent | 111a1427b5d4fee89690f8ef5023ddbaa0a8993f (diff) | |
download | ydb-4e4600bae44c02ba4a94c8f7a397a2c63c3cc235.tar.gz |
Merge PR #10741, #10799, #10732
\#10732 Fix a bug in YQL node creation for indexImplTable table settings
\#10799support computation graph invalidation in purecalc
\#10741Don't use Now() during replay for yt settings
commit_hash:bc4c150ceb2ae05fc19eaa4804fb668730a89410
Diffstat (limited to 'yql/essentials')
8 files changed, 17 insertions, 14 deletions
diff --git a/yql/essentials/core/extract_predicate/ut/extract_predicate_ut.cpp b/yql/essentials/core/extract_predicate/ut/extract_predicate_ut.cpp index e14bf63099..72c7f8ce67 100644 --- a/yql/essentials/core/extract_predicate/ut/extract_predicate_ut.cpp +++ b/yql/essentials/core/extract_predicate/ut/extract_predicate_ut.cpp @@ -44,9 +44,8 @@ Y_UNIT_TEST_SUITE(TYqlExtractPredicate) { auto ytGateway = CreateYtFileGateway(yqlNativeServices); typesCtx = MakeIntrusive<TTypeAnnotationContext>(); typesCtx->RandomProvider = CreateDeterministicRandomProvider(1); - auto ytState = MakeIntrusive<TYtState>(); + auto ytState = MakeIntrusive<TYtState>(typesCtx.Get()); ytState->Gateway = ytGateway; - ytState->Types = typesCtx.Get(); InitializeYtGateway(ytGateway, ytState); typesCtx->AddDataSink(YtProviderName, CreateYtDataSink(ytState)); diff --git a/yql/essentials/core/facade/yql_facade.cpp b/yql/essentials/core/facade/yql_facade.cpp index 2b7974a5e7..59cfeab848 100644 --- a/yql/essentials/core/facade/yql_facade.cpp +++ b/yql/essentials/core/facade/yql_facade.cpp @@ -312,6 +312,11 @@ TProgram::TProgram( QContext_.GetWriter()->Put({FacadeComponent, StaticCredentialsLabel}, credList).GetValueSync(); } else if (QContext_.CanRead()) { Credentials_ = MakeIntrusive<TCredentials>(); + Credentials_->SetUserCredentials({ + .OauthToken = "REPLAY_OAUTH", + .BlackboxSessionIdCookie = "REPLAY_SESSIONID" + }); + for (const auto& label : {StaticCredentialsLabel, DynamicCredentialsLabel}) { auto item = QContext_.GetReader()->Get({FacadeComponent, label}).GetValueSync(); if (item) { diff --git a/yql/essentials/core/ut/yql_expr_constraint_ut.cpp b/yql/essentials/core/ut/yql_expr_constraint_ut.cpp index f511eef97d..9b679ae50f 100644 --- a/yql/essentials/core/ut/yql_expr_constraint_ut.cpp +++ b/yql/essentials/core/ut/yql_expr_constraint_ut.cpp @@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TYqlExprConstraints) { auto ytGateway = CreateYtFileGateway(yqlNativeServices); auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>(); typeAnnotationContext->RandomProvider = CreateDeterministicRandomProvider(1); - auto ytState = MakeIntrusive<TYtState>(); + auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get()); ytState->Gateway = ytGateway; - ytState->Types = typeAnnotationContext.Get(); InitializeYtGateway(ytGateway, ytState); typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState)); diff --git a/yql/essentials/core/ut/yql_expr_discover_ut.cpp b/yql/essentials/core/ut/yql_expr_discover_ut.cpp index fe2251acee..bf59d252dc 100644 --- a/yql/essentials/core/ut/yql_expr_discover_ut.cpp +++ b/yql/essentials/core/ut/yql_expr_discover_ut.cpp @@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TDiscoverYqlExpr) { auto ytGateway = CreateYtFileGateway(yqlNativeServices); auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>(); typeAnnotationContext->DiscoveryMode = true; - auto ytState = MakeIntrusive<TYtState>(); + auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get()); ytState->Gateway = ytGateway; - ytState->Types = typeAnnotationContext.Get(); InitializeYtGateway(ytGateway, ytState); auto randomProvider = CreateDeterministicRandomProvider(1); diff --git a/yql/essentials/core/ut/yql_expr_optimize_ut.cpp b/yql/essentials/core/ut/yql_expr_optimize_ut.cpp index 9035fc9e41..81e30dd397 100644 --- a/yql/essentials/core/ut/yql_expr_optimize_ut.cpp +++ b/yql/essentials/core/ut/yql_expr_optimize_ut.cpp @@ -592,9 +592,8 @@ Y_UNIT_TEST_SUITE(TOptimizeYqlExpr) { auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables); auto ytGateway = CreateYtFileGateway(yqlNativeServices); auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>(); - auto ytState = MakeIntrusive<TYtState>(); + auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get()); ytState->Gateway = ytGateway; - ytState->Types = typeAnnotationContext.Get(); InitializeYtGateway(ytGateway, ytState); auto randomProvider = CreateDeterministicRandomProvider(1); diff --git a/yql/essentials/core/ut/yql_expr_providers_ut.cpp b/yql/essentials/core/ut/yql_expr_providers_ut.cpp index cc7b376e6f..2d2c79f49f 100644 --- a/yql/essentials/core/ut/yql_expr_providers_ut.cpp +++ b/yql/essentials/core/ut/yql_expr_providers_ut.cpp @@ -59,9 +59,8 @@ Y_UNIT_TEST_SUITE(TCompileWithProvidersYqlExpr) { auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables); auto ytGateway = CreateYtFileGateway(yqlNativeServices); auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>(); - auto ytState = MakeIntrusive<TYtState>(); + auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get()); ytState->Gateway = ytGateway; - ytState->Types = typeAnnotationContext.Get(); InitializeYtGateway(ytGateway, ytState); typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState)); diff --git a/yql/essentials/providers/common/provider/yql_provider.cpp b/yql/essentials/providers/common/provider/yql_provider.cpp index a7dd904aea..268c95caba 100644 --- a/yql/essentials/providers/common/provider/yql_provider.cpp +++ b/yql/essentials/providers/common/provider/yql_provider.cpp @@ -1155,12 +1155,15 @@ std::pair<IGraphTransformer::TStatus, TAsyncTransformCallbackFuture> FreezeUsedF return SyncError(); } + if (types.QContext.CanRead()) { + return SyncOk(); + } + auto future = FreezeUserDataTableIfNeeded(types.UserDataStorage, files, urlDownloadFilter); if (future.Wait(TDuration::Zero())) { files = future.GetValue()(); return SyncOk(); - } - else { + } else { return std::make_pair(IGraphTransformer::TStatus::Async, future.Apply( [](const NThreading::TFuture<std::function<TUserDataTable()>>& completedFuture) { return TAsyncTransformCallback([completedFuture](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) { diff --git a/yql/essentials/sql/v1/query.cpp b/yql/essentials/sql/v1/query.cpp index 8abc2a92bf..5548587090 100644 --- a/yql/essentials/sql/v1/query.cpp +++ b/yql/essentials/sql/v1/query.cpp @@ -319,10 +319,10 @@ static INode::TPtr CreateIndexDesc(const TIndexDescription& index, ETableSetting node.Q(node.Y(node.Q("dataColumns"), node.Q(dataColumns))) ); if (index.TableSettings.IsSet()) { - const auto& tableSettings = node.Y( + const auto& tableSettings = node.Q(node.Y( node.Q("tableSettings"), node.Q(CreateTableSettings(index.TableSettings, parsingMode, node)) - ); + )); indexNode = node.L(indexNode, tableSettings); } if (const auto* indexSettingsPtr = std::get_if<TVectorIndexSettings>(&index.IndexSettings)) { |