diff options
author | tsmax2004 <tsmax2004@yandex-team.com> | 2023-11-14 21:31:53 +0300 |
---|---|---|
committer | tsmax2004 <tsmax2004@yandex-team.com> | 2023-11-14 22:02:39 +0300 |
commit | c3520f09d6b014bae5840791412a796d49d166dd (patch) | |
tree | 3ac2f94a6158bd3a34475d5e416f5cc9f755c5e3 | |
parent | dc2b631c67243fa71124d24899ed58af28069700 (diff) | |
download | ydb-c3520f09d6b014bae5840791412a796d49d166dd.tar.gz |
YQ Connector:move clickhouse protocol to config
10 files changed, 72 insertions, 48 deletions
diff --git a/ydb/core/fq/libs/actors/clusters_from_connections.cpp b/ydb/core/fq/libs/actors/clusters_from_connections.cpp index a060b172ac..a155f7a42c 100644 --- a/ydb/core/fq/libs/actors/clusters_from_connections.cpp +++ b/ydb/core/fq/libs/actors/clusters_from_connections.cpp @@ -91,6 +91,7 @@ void FillSolomonClusterConfig(NYql::TSolomonClusterConfig& clusterConfig, template <typename TConnection> void FillGenericClusterConfigBase( + const NConfig::TCommonConfig& common, TGenericClusterConfig& clusterCfg, const TConnection& connection, const TString& connectionName, @@ -115,7 +116,7 @@ void FillGenericClusterConfigBase( // In YQv2 protocol can be configured via `CREATE EXTERNAL DATA SOURCE` params. switch (dataSourceKind) { case NYql::NConnector::NApi::CLICKHOUSE: - clusterCfg.SetProtocol(NYql::NConnector::NApi::EProtocol::NATIVE); + clusterCfg.SetProtocol(common.GetUseNativeProtocolForClickHouse() ? NYql::NConnector::NApi::EProtocol::NATIVE : NYql::NConnector::NApi::EProtocol::HTTP); break; case NYql::NConnector::NApi::POSTGRESQL: clusterCfg.SetProtocol(NYql::NConnector::NApi::EProtocol::NATIVE); @@ -130,6 +131,7 @@ void FillGenericClusterConfigBase( template <typename TConnection> void FillGenericClusterConfig( + const NConfig::TCommonConfig& common, TGenericClusterConfig& clusterCfg, const TConnection& connection, const TString& connectionName, @@ -137,11 +139,12 @@ void FillGenericClusterConfig( const TString& authToken, const THashMap<TString, TString>& accountIdSignatures ) { - FillGenericClusterConfigBase(clusterCfg, connection, connectionName, dataSourceKind, authToken, accountIdSignatures); + FillGenericClusterConfigBase(common, clusterCfg, connection, connectionName, dataSourceKind, authToken, accountIdSignatures); } template<> void FillGenericClusterConfig<FederatedQuery::PostgreSQLCluster>( + const NConfig::TCommonConfig& common, TGenericClusterConfig& clusterCfg, const FederatedQuery::PostgreSQLCluster& connection, const TString& connectionName, @@ -149,7 +152,7 @@ void FillGenericClusterConfig<FederatedQuery::PostgreSQLCluster>( const TString& authToken, const THashMap<TString, TString>& accountIdSignatures ){ - FillGenericClusterConfigBase(clusterCfg, connection, connectionName, dataSourceKind, authToken, accountIdSignatures); + FillGenericClusterConfigBase(common, clusterCfg, connection, connectionName, dataSourceKind, authToken, accountIdSignatures); clusterCfg.mutable_datasourceoptions()->insert({TString("schema"), TString(connection.schema())}); } @@ -190,9 +193,8 @@ NYql::TSolomonClusterConfig CreateSolomonClusterConfig(const TString& name, } void AddClustersFromConnections( + const NConfig::TCommonConfig& common, const THashMap<TString, FederatedQuery::Connection>& connections, - bool useBearerForYdb, - const TString& objectStorageEndpoint, const TString& monitoringEndpoint, const TString& authToken, const THashMap<TString, TString>& accountIdSignatures, @@ -212,13 +214,14 @@ void AddClustersFromConnections( if (db.endpoint()) clusterCfg->SetEndpoint(db.endpoint()); clusterCfg->SetSecure(db.secure()); - clusterCfg->SetAddBearerToToken(useBearerForYdb); + clusterCfg->SetAddBearerToToken(common.GetUseBearerForYdb()); FillClusterAuth(*clusterCfg, db.auth(), authToken, accountIdSignatures); clusters.emplace(connectionName, YdbProviderName); break; } case FederatedQuery::ConnectionSetting::kClickhouseCluster: { FillGenericClusterConfig( + common, *gatewaysConfig.MutableGeneric()->AddClusterMapping(), conn.content().setting().clickhouse_cluster(), connectionName, @@ -231,14 +234,14 @@ void AddClustersFromConnections( case FederatedQuery::ConnectionSetting::kObjectStorage: { const auto& s3 = conn.content().setting().object_storage(); auto* clusterCfg = gatewaysConfig.MutableS3()->AddClusterMapping(); - FillS3ClusterConfig(*clusterCfg, connectionName, authToken, objectStorageEndpoint, accountIdSignatures, s3); + FillS3ClusterConfig(*clusterCfg, connectionName, authToken, common.GetObjectStorageEndpoint(), accountIdSignatures, s3); clusters.emplace(connectionName, S3ProviderName); break; } case FederatedQuery::ConnectionSetting::kDataStreams: { const auto& ds = conn.content().setting().data_streams(); auto* clusterCfg = gatewaysConfig.MutablePq()->AddClusterMapping(); - FillPqClusterConfig(*clusterCfg, connectionName, useBearerForYdb, authToken, accountIdSignatures, ds); + FillPqClusterConfig(*clusterCfg, connectionName, common.GetUseBearerForYdb(), authToken, accountIdSignatures, ds); clusters.emplace(connectionName, PqProviderName); break; } @@ -251,6 +254,7 @@ void AddClustersFromConnections( } case FederatedQuery::ConnectionSetting::kPostgresqlCluster: { FillGenericClusterConfig( + common, *gatewaysConfig.MutableGeneric()->AddClusterMapping(), conn.content().setting().postgresql_cluster(), connectionName, diff --git a/ydb/core/fq/libs/actors/clusters_from_connections.h b/ydb/core/fq/libs/actors/clusters_from_connections.h index 8b83569f14..c17538c226 100644 --- a/ydb/core/fq/libs/actors/clusters_from_connections.h +++ b/ydb/core/fq/libs/actors/clusters_from_connections.h @@ -2,6 +2,7 @@ #include <ydb/library/yql/providers/common/proto/gateways_config.pb.h> #include <ydb/public/api/protos/draft/fq.pb.h> +#include <ydb/core/fq/libs/config/protos/common.pb.h> namespace NFq { @@ -11,9 +12,8 @@ NYql::TS3ClusterConfig CreateS3ClusterConfig(const TString& name, const TString& NYql::TSolomonClusterConfig CreateSolomonClusterConfig(const TString& name, const TString& authToken, const TString& endpoint, const TString& accountSignature, const FederatedQuery::Monitoring& monitoring); -void AddClustersFromConnections(const THashMap<TString, FederatedQuery::Connection>& connections, - bool useBearerForYdb, - const TString& objectStorageEndpoint, +void AddClustersFromConnections(const NConfig::TCommonConfig& common, + const THashMap<TString, FederatedQuery::Connection>& connections, const TString& monitoringEndpoint, const TString& authToken, const THashMap<TString, TString>& accountIdSignatures, diff --git a/ydb/core/fq/libs/actors/run_actor.cpp b/ydb/core/fq/libs/actors/run_actor.cpp index 2e68f5555b..f82905bee1 100644 --- a/ydb/core/fq/libs/actors/run_actor.cpp +++ b/ydb/core/fq/libs/actors/run_actor.cpp @@ -1890,9 +1890,8 @@ private: //todo: consider cluster name clashes AddClustersFromConfig(gatewaysConfig, clusters); - AddClustersFromConnections(YqConnections, - Params.Config.GetCommon().GetUseBearerForYdb(), - Params.Config.GetCommon().GetObjectStorageEndpoint(), + AddClustersFromConnections(Params.Config.GetCommon(), + YqConnections, monitoringEndpoint, Params.AuthToken, Params.AccountIdSignatures, diff --git a/ydb/core/fq/libs/compute/common/run_actor_params.cpp b/ydb/core/fq/libs/compute/common/run_actor_params.cpp index 1fa989e1ac..048540c2ed 100644 --- a/ydb/core/fq/libs/compute/common/run_actor_params.cpp +++ b/ydb/core/fq/libs/compute/common/run_actor_params.cpp @@ -73,7 +73,7 @@ TRunActorParams::TRunActorParams( , Scope(scope) , AuthToken(authToken) , DatabaseResolver(databaseResolver) - , MdbEndpointGenerator(NFq::MakeMdbEndpointGeneratorGeneric(config.GetCommon().GetMdbTransformHost())) + , MdbEndpointGenerator(NFq::MakeMdbEndpointGeneratorGeneric(config.GetCommon().GetMdbTransformHost(), config.GetCommon().GetUseNativeProtocolForClickHouse())) , QueryId(queryId) , UserId(userId) , Owner(owner) diff --git a/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.cpp b/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.cpp index 53dc998552..4af0f3bb23 100644 --- a/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.cpp +++ b/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.cpp @@ -169,8 +169,8 @@ TString CreateAuthParamsQuery(const FederatedQuery::ConnectionSetting& setting, TString MakeCreateExternalDataSourceQuery( const FederatedQuery::ConnectionContent& connectionContent, - const TString& objectStorageEndpoint, - const TSigner::TPtr& signer) { + const TSigner::TPtr& signer, + const NConfig::TCommonConfig& common) { using namespace fmt::literals; TString properties; @@ -184,11 +184,12 @@ TString MakeCreateExternalDataSourceQuery( SOURCE_TYPE="ClickHouse", MDB_CLUSTER_ID={mdb_cluster_id}, DATABASE_NAME={database_name}, - PROTOCOL="NATIVE", + PROTOCOL="{protocol}", USE_TLS="true" )", "mdb_cluster_id"_a = EncloseAndEscapeString(connectionContent.setting().clickhouse_cluster().database_id(), '"'), - "database_name"_a = EncloseAndEscapeString(connectionContent.setting().clickhouse_cluster().database_name(), '"')); + "database_name"_a = EncloseAndEscapeString(connectionContent.setting().clickhouse_cluster().database_name(), '"'), + "protocol"_a = common.GetUseNativeProtocolForClickHouse() ? "NATIVE" : "HTTP"); break; case FederatedQuery::ConnectionSetting::kDataStreams: break; @@ -199,7 +200,7 @@ TString MakeCreateExternalDataSourceQuery( SOURCE_TYPE="ObjectStorage", LOCATION="{location}" )", - "location"_a = objectStorageEndpoint + "/" + EscapeString(bucketName, '"') + "/"); + "location"_a = common.GetObjectStorageEndpoint() + "/" + EscapeString(bucketName, '"') + "/"); break; } case FederatedQuery::ConnectionSetting::kMonitoring: diff --git a/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.h b/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.h index ef589356df..bb6a9fc38e 100644 --- a/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.h +++ b/ydb/core/fq/libs/control_plane_proxy/actors/query_utils.h @@ -3,6 +3,7 @@ #include <util/generic/string.h> #include <ydb/core/fq/libs/control_plane_storage/events/events.h> #include <ydb/core/fq/libs/signer/signer.h> +#include <ydb/core/fq/libs/config/protos/common.pb.h> namespace NFq { namespace NPrivate { @@ -15,8 +16,8 @@ TMaybe<TString> DropSecretObjectQuery(const TString& name); TString MakeCreateExternalDataSourceQuery( const FederatedQuery::ConnectionContent& connectionContent, - const TString& objectStorageEndpoint, - const TSigner::TPtr& signer); + const TSigner::TPtr& signer, + const NConfig::TCommonConfig& common); TString MakeDeleteExternalDataSourceQuery(const TString& sourceName); diff --git a/ydb/core/fq/libs/control_plane_proxy/actors/ydb_schema_query_actor.cpp b/ydb/core/fq/libs/control_plane_proxy/actors/ydb_schema_query_actor.cpp index 30eab890d2..20fe6a6ca0 100644 --- a/ydb/core/fq/libs/control_plane_proxy/actors/ydb_schema_query_actor.cpp +++ b/ydb/core/fq/libs/control_plane_proxy/actors/ydb_schema_query_actor.cpp @@ -528,10 +528,9 @@ NActors::IActor* MakeCreateConnectionActor( TSigner::TPtr signer, bool withoutRollback) { auto queryFactoryMethod = - [objectStorageEndpoint = commonConfig.GetObjectStorageEndpoint(), - signer = std::move(signer), + [signer = std::move(signer), requestTimeout, - &counters, permissions, withoutRollback](const TEvControlPlaneProxy::TEvCreateConnectionRequest::TPtr& request) + &counters, permissions, withoutRollback, commonConfig](const TEvControlPlaneProxy::TEvCreateConnectionRequest::TPtr& request) -> std::vector<TSchemaQueryTask> { auto& connectionContent = request->Get()->Request.content(); @@ -566,7 +565,7 @@ NActors::IActor* MakeCreateConnectionActor( }; statements.push_back( TSchemaQueryTask{.SQL = TString{MakeCreateExternalDataSourceQuery( - connectionContent, objectStorageEndpoint, signer)}, + connectionContent, signer, commonConfig)}, .ScheduleErrorRecoverySQLGeneration = withoutRollback ? NoRecoverySQLGeneration() : alreadyExistRecoveryActorFactoryMethod, @@ -603,8 +602,8 @@ NActors::IActor* MakeModifyConnectionActor( const NConfig::TCommonConfig& commonConfig, TSigner::TPtr signer) { auto queryFactoryMethod = - [objectStorageEndpoint = commonConfig.GetObjectStorageEndpoint(), - signer = std::move(signer)]( + [signer = std::move(signer), + commonConfig]( const TEvControlPlaneProxy::TEvModifyConnectionRequest::TPtr& request) -> std::vector<TSchemaQueryTask> { using namespace fmt::literals; @@ -644,7 +643,7 @@ NActors::IActor* MakeModifyConnectionActor( statements.push_back(TSchemaQueryTask{ .SQL = TString{MakeDeleteExternalDataSourceQuery(oldConnectionContent.name())}, .RollbackSQL = TString{MakeCreateExternalDataSourceQuery( - oldConnectionContent, objectStorageEndpoint, signer)}, + oldConnectionContent, signer, commonConfig)}, .ShouldSkipStepOnError = IsPathDoesNotExistIssue}); if (dropOldSecret) { @@ -663,7 +662,7 @@ NActors::IActor* MakeModifyConnectionActor( statements.push_back( TSchemaQueryTask{.SQL = TString{MakeCreateExternalDataSourceQuery( - newConnectionContent, objectStorageEndpoint, signer)}, + newConnectionContent, signer, commonConfig)}, .RollbackSQL = TString{MakeDeleteExternalDataSourceQuery( newConnectionContent.name())}}); @@ -714,8 +713,8 @@ NActors::IActor* MakeDeleteConnectionActor( const NConfig::TCommonConfig& commonConfig, TSigner::TPtr signer) { auto queryFactoryMethod = - [objectStorageEndpoint = commonConfig.GetObjectStorageEndpoint(), - signer = std::move(signer)]( + [signer = std::move(signer), + commonConfig]( const TEvControlPlaneProxy::TEvDeleteConnectionRequest::TPtr& request) -> std::vector<TSchemaQueryTask> { auto& connectionContent = *request->Get()->ConnectionContent; @@ -726,8 +725,8 @@ NActors::IActor* MakeDeleteConnectionActor( std::vector<TSchemaQueryTask> statements = {TSchemaQueryTask{ .SQL = TString{MakeDeleteExternalDataSourceQuery(connectionContent.name())}, .RollbackSQL = MakeCreateExternalDataSourceQuery(connectionContent, - objectStorageEndpoint, - signer), + signer, + commonConfig), .ShouldSkipStepOnError = IsPathDoesNotExistIssue}}; if (dropSecret) { statements.push_back( diff --git a/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.cpp b/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.cpp index 22f51caef5..88466ce081 100644 --- a/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.cpp +++ b/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.cpp @@ -8,8 +8,10 @@ namespace NFq { using TEndpoint = NYql::IMdbEndpointGenerator::TEndpoint; - constexpr ui32 CLICKHOUSE_SECURE_PORT = 9440; - constexpr ui32 CLICKHOUSE_INSECURE_PORT = 9000; + constexpr ui32 CLICKHOUSE_NATIVE_SECURE_PORT = 9440; + constexpr ui32 CLICKHOUSE_NATIVE_INSECURE_PORT = 9000; + constexpr ui32 CLICKHOUSE_HTTP_SECURE_PORT = 8443; + constexpr ui32 CLICKHOUSE_HTTP_INSECURE_PORT = 8123; // Managed PostgreSQL provides the only port both for secure and insecure connections constexpr ui32 POSTGRESQL_PORT = 6432; @@ -20,7 +22,7 @@ namespace NFq { // Inherited from here // https://a.yandex-team.ru/arcadia/ydb/core/fq/libs/actors/database_resolver.cpp?rev=r11819335#L27 if (databaseType == NYql::EDatabaseType::ClickHouse) { - auto port = useTls ? CLICKHOUSE_SECURE_PORT : CLICKHOUSE_INSECURE_PORT; + auto port = useTls ? CLICKHOUSE_HTTP_SECURE_PORT : CLICKHOUSE_HTTP_INSECURE_PORT; return TEndpoint(ReplaceDomain(mdbHost), port); } @@ -37,8 +39,8 @@ namespace NFq { // that interacts with data sources through a separate Connector service class TMdbEndpointGeneratorGeneric: public NYql::IMdbEndpointGenerator { public: - TMdbEndpointGeneratorGeneric(bool transformHost) - : TransformHost(transformHost) + TMdbEndpointGeneratorGeneric(bool transformHost, bool useNativeProtocolForClickHouse = false) + : TransformHost(transformHost), UseNativeProtocolForClickHouse(useNativeProtocolForClickHouse) { } @@ -48,8 +50,13 @@ namespace NFq { switch (databaseType) { case NYql::EDatabaseType::ClickHouse: { // https://cloud.yandex.ru/docs/managed-clickhouse/operations/connect - // TODO: fix Native protocol + TLS https://st.yandex-team.ru/YQ-2286 - auto port = useTls ? CLICKHOUSE_SECURE_PORT : CLICKHOUSE_INSECURE_PORT; + ui32 port; + if (UseNativeProtocolForClickHouse) { + port = useTls ? CLICKHOUSE_NATIVE_SECURE_PORT : CLICKHOUSE_NATIVE_INSECURE_PORT; + } else { + port = useTls ? CLICKHOUSE_HTTP_SECURE_PORT : CLICKHOUSE_HTTP_INSECURE_PORT; + } + return TEndpoint(fixedHost, port); } case NYql::EDatabaseType::PostgreSQL: @@ -62,11 +69,12 @@ namespace NFq { private: bool TransformHost; + bool UseNativeProtocolForClickHouse; }; NYql::IMdbEndpointGenerator::TPtr - MakeMdbEndpointGeneratorGeneric(bool transformHost) { - return std::make_shared<TMdbEndpointGeneratorGeneric>(transformHost); + MakeMdbEndpointGeneratorGeneric(bool transformHost, bool useNativeProtocolForClickHouse) { + return std::make_shared<TMdbEndpointGeneratorGeneric>(transformHost, useNativeProtocolForClickHouse); } // TMdbEndpointGeneratorNoop just does nothing diff --git a/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.h b/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.h index f7be4f68de..75332332cb 100644 --- a/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.h +++ b/ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.h @@ -5,6 +5,6 @@ namespace NFq { NYql::IMdbEndpointGenerator::TPtr MakeMdbEndpointGeneratorLegacy(); - NYql::IMdbEndpointGenerator::TPtr MakeMdbEndpointGeneratorGeneric(bool transformHost); + NYql::IMdbEndpointGenerator::TPtr MakeMdbEndpointGeneratorGeneric(bool transformHost, bool useNativeProtocolForClickHouse = false); NYql::IMdbEndpointGenerator::TPtr MakeMdbEndpointGeneratorNoop(); } diff --git a/ydb/core/fq/libs/db_id_async_resolver_impl/ut/mdb_endpoint_generator_ut.cpp b/ydb/core/fq/libs/db_id_async_resolver_impl/ut/mdb_endpoint_generator_ut.cpp index 0985c6ee22..687570c5de 100644 --- a/ydb/core/fq/libs/db_id_async_resolver_impl/ut/mdb_endpoint_generator_ut.cpp +++ b/ydb/core/fq/libs/db_id_async_resolver_impl/ut/mdb_endpoint_generator_ut.cpp @@ -9,11 +9,11 @@ Y_UNIT_TEST_SUITE(MdbEndpoingGenerator) { UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "rc1c-p5waby2y5y1kb5ue.db.yandex.net", true), - TEndpoint("rc1c-p5waby2y5y1kb5ue.db.yandex.net", 9440)); + TEndpoint("rc1c-p5waby2y5y1kb5ue.db.yandex.net", 8443)); UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "ya.ru", false), - TEndpoint("ya.db.yandex.net", 9000)); + TEndpoint("ya.db.yandex.net", 8123)); } Y_UNIT_TEST(Generic_NoTransformHost) { @@ -21,7 +21,7 @@ Y_UNIT_TEST_SUITE(MdbEndpoingGenerator) { UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", true), - TEndpoint("rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", 9440)); + TEndpoint("rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", 8443)); UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::PostgreSQL, "rc1b-eyt6dtobu96rwydq.mdb.yandexcloud.net", false), @@ -33,10 +33,22 @@ Y_UNIT_TEST_SUITE(MdbEndpoingGenerator) { UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", false), - TEndpoint("rc1a-d6dv17lv47v5mcop.db.yandex.net", 9000)); + TEndpoint("rc1a-d6dv17lv47v5mcop.db.yandex.net", 8123)); UNIT_ASSERT_VALUES_EQUAL( transformer->ToEndpoint(NYql::EDatabaseType::PostgreSQL, "rc1b-eyt6dtobu96rwydq.mdb.yandexcloud.net", true), TEndpoint("rc1b-eyt6dtobu96rwydq.db.yandex.net", 6432)); } + + Y_UNIT_TEST(Generic_ClickhouseNative) { + auto transformer = NFq::MakeMdbEndpointGeneratorGeneric(false, true); + + UNIT_ASSERT_VALUES_EQUAL( + transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", true), + TEndpoint("rc1a-d6dv17lv47v5mcop.mdb.yandexcloud.net", 9440)); + + UNIT_ASSERT_VALUES_EQUAL( + transformer->ToEndpoint(NYql::EDatabaseType::ClickHouse, "rc1b-eyt6dtobu96rwydq.mdb.yandexcloud.net", false), + TEndpoint("rc1b-eyt6dtobu96rwydq.mdb.yandexcloud.net", 9000)); + } } |