Skip to content

Add PG provider to pgrun #732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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