Skip to content

Commit

Permalink
Do not depend on AppData in provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Hor911 committed Mar 30, 2024
1 parent 6ba1d70 commit c23f3ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions ydb/core/kqp/host/kqp_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,7 @@ class TKqpHost : public IKqpHost {
state->Configuration->AllowAtomicUploadCommit = queryType == EKikimrQueryType::Script;
state->Configuration->Init(FederatedQuerySetup->S3GatewayConfig, TypesCtx);
state->Gateway = FederatedQuerySetup->HttpGateway;
state->ExecutorPoolId = AppData()->UserPoolId;

auto dataSource = NYql::CreateS3DataSource(state);
auto dataSink = NYql::CreateS3DataSink(state);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "yql_s3_dq_integration.h"
#include "yql_s3_mkql_compiler.h"

#include <ydb/core/base/appdata.h>

#include <ydb/library/yql/dq/expr_nodes/dq_expr_nodes.h>
#include <ydb/library/yql/providers/common/dq/yql_dq_integration_impl.h>
#include <ydb/library/yql/providers/common/schema/expr/yql_expr_schema.h>
Expand All @@ -20,7 +18,6 @@

#include <library/cpp/json/writer/json_value.h>


namespace NYql {

using namespace NNodes;
Expand Down Expand Up @@ -515,7 +512,7 @@ class TS3DqIntegration: public TDqIntegrationBase {
NS3Lister::ES3PatternType::Wildcard
),
NActors::TMailboxType::HTSwap,
NKikimr::AppData()->UserPoolId
State_->ExecutorPoolId
);

NActorsProto::TActorId protoId;
Expand Down
1 change: 1 addition & 0 deletions ydb/library/yql/providers/s3/provider/yql_s3_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct TS3State : public TThrRefBase
const NKikimr::NMiniKQL::IFunctionRegistry* FunctionRegistry = nullptr;
ISecuredServiceAccountCredentialsFactory::TPtr CredentialsFactory;
IHTTPGateway::TPtr Gateway;
ui32 ExecutorPoolId = 0;
};

TDataProviderInitializer GetS3DataProviderInitializer(IHTTPGateway::TPtr gateway, ISecuredServiceAccountCredentialsFactory::TPtr credentialsFactory = nullptr, bool allowLocalFiles = false);
Expand Down

0 comments on commit c23f3ec

Please sign in to comment.