Skip to content

Commit

Permalink
Add PG provider to pgrun (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLolthe1st authored Dec 27, 2023
1 parent 0398864 commit 06f9376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ydb/library/yql/tools/pgrun/pgrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <ydb/library/yql/providers/common/provider/yql_provider_names.h>
#include <ydb/library/yql/providers/common/proto/gateways_config.pb.h>
#include <ydb/library/yql/providers/yt/provider/yql_yt_provider.h>
#include <ydb/library/yql/providers/pg/provider/yql_pg_provider.h>
#include <ydb/library/yql/public/issue/yql_issue.h>

#include <library/cpp/getopt/last_getopt.h>
Expand Down Expand Up @@ -971,6 +972,7 @@ int Main(int argc, char* argv[])

static const TString DefaultCluster{"plato"};
clusterMapping[DefaultCluster] = YtProviderName;
clusterMapping["pg_catalog"] = PgProviderName;

opts.AddHelpOption();
opts.AddLongOption("datadir", "directory for tables").StoreResult<TString>(&rawDataDir);
Expand Down Expand Up @@ -1001,6 +1003,7 @@ int Main(int argc, char* argv[])

TVector<TDataProviderInitializer> dataProvidersInit;
dataProvidersInit.push_back(GetYtNativeDataProviderInitializer(ytNativeGateway));
dataProvidersInit.push_back(GetPgDataProviderInitializer());

TExprContext ctx;
TExprContext::TFreezeGuard freezeGuard(ctx);
Expand Down
1 change: 1 addition & 0 deletions ydb/library/yql/tools/pgrun/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ PEERDIR(
ydb/library/yql/providers/yt/gateway/file
ydb/library/yql/providers/yt/comp_nodes/llvm
ydb/library/yql/providers/yt/codec/codegen
ydb/library/yql/providers/pg/provider
ydb/library/yql/core/url_preprocessing
ydb/library/yql/parser/pg_wrapper
)
Expand Down

0 comments on commit 06f9376

Please sign in to comment.