diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-22 10:34:32 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-22 10:43:00 +0300 |
commit | 4d92367562edf8d55043a4f3bb7879fb796bcdea (patch) | |
tree | fda8d31639db780d1573635d3cb85cae4a120eec | |
parent | 906f76f9747ab13688c604a47e9be27b6af9112b (diff) | |
download | ydb-4d92367562edf8d55043a4f3bb7879fb796bcdea.tar.gz |
Intermediate changes
-rw-r--r-- | yt/yt/core/test_framework/public.h | 32 | ||||
-rw-r--r-- | yt/yt/core/test_framework/test_proxy_service-inl.h | 82 | ||||
-rw-r--r-- | yt/yt/core/test_framework/test_proxy_service.cpp | 286 | ||||
-rw-r--r-- | yt/yt/core/test_framework/test_proxy_service.h | 184 | ||||
-rw-r--r-- | yt/yt/core/test_framework/ya.make | 1 | ||||
-rw-r--r-- | yt/yt/library/query/base/public.h | 160 |
6 files changed, 745 insertions, 0 deletions
diff --git a/yt/yt/core/test_framework/public.h b/yt/yt/core/test_framework/public.h new file mode 100644 index 0000000000..8850e5cdbc --- /dev/null +++ b/yt/yt/core/test_framework/public.h @@ -0,0 +1,32 @@ +#pragma once + +#include <yt/yt/core/misc/public.h> + +#include <yt/yt/core/rpc/service_detail.h> + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + +using TServiceMap = THashMap<TString, NRpc::IServicePtr>; +using TRealmIdServiceMap = THashMap<TGuid, TServiceMap>; + +DECLARE_REFCOUNTED_CLASS(TTestService); +DECLARE_REFCOUNTED_CLASS(TTestChannelFactory); +DECLARE_REFCOUNTED_CLASS(TTestChannel); +DECLARE_REFCOUNTED_CLASS(TTestClientRequestControl); + +namespace NRpc { + +//////////////////////////////////////////////////////////////////////////////// + +DECLARE_REFCOUNTED_CLASS(TTestBus); + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NRpc + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT + diff --git a/yt/yt/core/test_framework/test_proxy_service-inl.h b/yt/yt/core/test_framework/test_proxy_service-inl.h new file mode 100644 index 0000000000..3a6556e2b5 --- /dev/null +++ b/yt/yt/core/test_framework/test_proxy_service-inl.h @@ -0,0 +1,82 @@ +#ifndef TEST_PROXY_SERVICE_INL_H_ +#error "Direct inclusion of this file is not allowed, include test_proxy_service.h" +// For the sake of sane code completion. +#include "test_proxy_service.h" +#endif + +#include <yt/yt/core/misc/common.h> + +#include <yt/yt/core/misc/collection_helpers.h> + +#include <util/system/type_name.h> + +namespace NYT::NRpc { + +//////////////////////////////////////////////////////////////////////////////// + +inline TServiceMap ConvertToMap(const IServicePtr& service) +{ + return {std::make_pair(service->GetServiceId().ServiceName, service)}; +} + +inline TServiceMap ConvertToMap(const std::vector<IServicePtr>& services) +{ + TServiceMap map; + for (const auto& service : services) { + YT_VERIFY(service); + + EmplaceOrCrash(map, service->GetServiceId().ServiceName, service); + } + + return map; +} + +inline TRealmIdServiceMap ConvertToRealmIdMap(const TServiceMap& map) +{ + TRealmIdServiceMap realmIdMap; + + for (const auto& [serviceName, service] : map) { + YT_VERIFY(service); + + auto serviceId = service->GetServiceId(); + realmIdMap[serviceId.RealmId][service->GetServiceId().ServiceName] = service; + } + + return realmIdMap; +} + +template <class TContainer> +TRealmIdServiceMap ConvertToRealmIdMap(const TContainer& services) +{ + return ConvertToRealmIdMap(ConvertToMap(services)); +} + +template <class TContainer> +THashMap<TString, TRealmIdServiceMap> ConvertToAddressMap(const THashMap<TString, TContainer>& addressToServices) +{ + THashMap<TString, TRealmIdServiceMap> result; + + for (const auto& [address, map] : addressToServices) { + result[address] = ConvertToRealmIdMap(map); + } + + return result; +} + +template <class TAddressContainer, class TDefaultContainer> +IChannelFactoryPtr CreateTestChannelFactory( + const THashMap<TString, TAddressContainer>& addressToServices, + const TDefaultContainer& defaultServices) +{ + return New<TTestChannelFactory>(ConvertToAddressMap(addressToServices), ConvertToRealmIdMap(defaultServices)); +} + +template <class TDefaultContainer> +IChannelFactoryPtr CreateTestChannelFactoryWithDefaultServices(const TDefaultContainer& defaultServices) +{ + return CreateTestChannelFactory(THashMap<TString, TDefaultContainer>{}, defaultServices); +} + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NRpc diff --git a/yt/yt/core/test_framework/test_proxy_service.cpp b/yt/yt/core/test_framework/test_proxy_service.cpp new file mode 100644 index 0000000000..b9784f1ae7 --- /dev/null +++ b/yt/yt/core/test_framework/test_proxy_service.cpp @@ -0,0 +1,286 @@ +#include "test_proxy_service.h" + +namespace NYT::NRpc { + +using namespace NYTree; +using namespace ::NYT::NBus; + +using NYT::ToProto; +using NYT::FromProto; + +//////////////////////////////////////////////////////////////////////////////// + +TTestChannelFactory::TTestChannelFactory( + THashMap<TString, TRealmIdServiceMap> addressToServices, + TRealmIdServiceMap defaultServices) + : AddressToServices_(std::move(addressToServices)) + , DefaultServices_(std::move(defaultServices)) +{ } + +IChannelPtr TTestChannelFactory::CreateChannel(const TString& address) +{ + return New<TTestChannel>(GetOrDefault(AddressToServices_, address, {}), DefaultServices_, address); +} + +//////////////////////////////////////////////////////////////////////////////// + +TTestChannel::TTestChannel( + TRealmIdServiceMap services, + TRealmIdServiceMap defaultServices, + TString address) + : Services_(std::move(services)) + , DefaultServices_(std::move(defaultServices)) + , Address_(std::move(address)) + , Attributes_(ConvertToAttributes(BuildYsonStringFluently() + .BeginMap() + .Item("address").Value(Address_) + .EndMap())) +{ } + +const TString& TTestChannel::GetEndpointDescription() const +{ + return Address_; +} + +const IAttributeDictionary& TTestChannel::GetEndpointAttributes() const +{ + return *Attributes_; +} + +const IServicePtr& TTestChannel::GetServiceOrThrow(const TServiceId& serviceId) const +{ + const auto& realmId = serviceId.RealmId; + const auto& serviceName = serviceId.ServiceName; + auto& services = Services_.empty() ? DefaultServices_ : Services_; + auto serviceMapIt = services.find(realmId); + + if (serviceMapIt == services.end()) { + if (realmId) { + auto innerError = TError(EErrorCode::NoSuchRealm, "Request realm is unknown") + << TErrorAttribute("service", serviceName) + << TErrorAttribute("realm_id", realmId); + THROW_ERROR_EXCEPTION( + EErrorCode::NoSuchService, + "Service is not registered") + << innerError; + } else { + THROW_ERROR_EXCEPTION( + EErrorCode::NoSuchService, + "Service is not registered") + << TErrorAttribute("service", serviceName) + << TErrorAttribute("realm_id", realmId); + } + } + auto& serviceMap = serviceMapIt->second; + auto serviceIt = serviceMap.find(serviceName); + if (serviceIt == serviceMap.end()) { + THROW_ERROR_EXCEPTION( + EErrorCode::NoSuchService, + "Service is not registered") + << TErrorAttribute("service", serviceName) + << TErrorAttribute("realm_id", realmId); + } + + return serviceIt->second; +} + +void TTestChannel::HandleRequestResult( + TString address, + TGuid requestId, + IClientResponseHandlerPtr response, + const TError& error) +{ + auto busIt = RequestToBus_.find(std::make_pair(address, requestId)); + auto bus = busIt->second; + + if (error.IsOK() && bus->GetMessage().Size() >= 2) { + response->HandleResponse(bus->GetMessage(), address); + } else if (error.IsOK()) { + NProto::TResponseHeader header; + TryParseResponseHeader(bus->GetMessage(), &header); + auto wrappedError = TError("Test proxy service error") + << FromProto<TError>(header.error()); + response->HandleError(std::move(wrappedError)); + } else { + auto wrappedError = TError("Test proxy service error") + << error; + response->HandleError(std::move(wrappedError)); + } + + RequestToBus_.erase(busIt); +} + +IClientRequestControlPtr TTestChannel::Send( + IClientRequestPtr request, + IClientResponseHandlerPtr responseHandler, + const TSendOptions& /*options*/) +{ + TServiceId serviceId(request->GetService(), request->GetRealmId()); + auto service = GetServiceOrThrow(serviceId); + auto requestId = request->GetRequestId(); + auto requestControl = New<TTestClientRequestControl>( + service, + requestId); + + auto bus = New<TTestBus>(Address_); + EmplaceOrCrash(RequestToBus_, std::make_pair(Address_, requestId), bus); + + try { + service->HandleRequest( + std::make_unique<NProto::TRequestHeader>(request->Header()), + request->Serialize(), + bus); + bus->GetReadyResponseFuture() + .Subscribe(BIND(&TTestChannel::HandleRequestResult, MakeStrong(this), Address_, requestId, responseHandler)); + } catch (const std::exception& ex) { + HandleRequestResult(Address_, requestId, responseHandler, ex); + } + + return requestControl; +} + +void TTestChannel::Terminate(const TError& error) +{ + YT_VERIFY(!error.IsOK()); + VERIFY_THREAD_AFFINITY_ANY(); + + if (TerminationFlag_.exchange(true)) { + return; + } + + TerminationError_.Store(error); + Terminated_.Fire(error); +} + +void TTestChannel::SubscribeTerminated(const TCallback<void(const TError&)>& callback) +{ + Terminated_.Subscribe(callback); +} + +void TTestChannel::UnsubscribeTerminated(const TCallback<void(const TError&)>& callback) +{ + Terminated_.Unsubscribe(callback); +} + +int TTestChannel::GetInflightRequestCount() +{ + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// + +TTestBus::TTestBus(TString address) + : Address_(std::move(address)) + , Attributes_(ConvertToAttributes(BuildYsonStringFluently() + .BeginMap() + .Item("address").Value(Address_) + .EndMap())) + , NetworkAddress_(NNet::TNetworkAddress()) +{ } + +const TString& TTestBus::GetEndpointDescription() const +{ + return Address_; +} + +const NYTree::IAttributeDictionary& TTestBus::GetEndpointAttributes() const +{ + return *Attributes_; +} + +const TString& TTestBus::GetEndpointAddress() const +{ + return Address_; +} + +const NNet::TNetworkAddress& TTestBus::GetEndpointNetworkAddress() const +{ + return NetworkAddress_; +} + +TBusNetworkStatistics TTestBus::GetNetworkStatistics() const +{ + return TBusNetworkStatistics{}; +} + +bool TTestBus::IsEndpointLocal() const +{ + return false; +} + +bool TTestBus::IsEncrypted() const +{ + return false; +} + +TFuture<void> TTestBus::GetReadyFuture() const +{ + return VoidFuture; +} + +TFuture<void> TTestBus::Send(TSharedRefArray message, const ::NYT::NBus::TSendOptions& /*options*/) +{ + YT_VERIFY(Message_.Empty() && !ReadyPromise_.IsSet()); + + Message_ = message; + ReadyPromise_.TrySet(); + return ReadyPromise_.ToFuture(); +} + +void TTestBus::SetTosLevel(TTosLevel /*tosLevel*/) +{ + // Do nothing. +} + +void TTestBus::Terminate(const TError& error) +{ + ReadyPromise_.TrySet(error); +} + +TSharedRefArray TTestBus::GetMessage() const +{ + return Message_; +} + +TFuture<void> TTestBus::GetReadyResponseFuture() const +{ + return ReadyPromise_.ToFuture(); +} + +void TTestBus::SubscribeTerminated(const TCallback<void(const TError&)>& callback) +{ + Terminated_.Subscribe(callback); +} + +void TTestBus::UnsubscribeTerminated(const TCallback<void(const TError&)>& callback) +{ + Terminated_.Unsubscribe(callback); +} + +//////////////////////////////////////////////////////////////////////////////// + +TTestClientRequestControl::TTestClientRequestControl(IServicePtr service, TRequestId requestId) + : Service_(std::move(service)) + , RequestId_(requestId) +{ } + +void TTestClientRequestControl::Cancel() +{ + Service_->HandleRequestCancellation(RequestId_); +} + +TFuture<void> TTestClientRequestControl::SendStreamingPayload(const TStreamingPayload& payload) +{ + Service_->HandleStreamingPayload(RequestId_, payload); + return VoidFuture; +} + +TFuture<void> TTestClientRequestControl::SendStreamingFeedback(const TStreamingFeedback& feedback) +{ + Service_->HandleStreamingFeedback(RequestId_, feedback); + return VoidFuture; +} + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NRpc diff --git a/yt/yt/core/test_framework/test_proxy_service.h b/yt/yt/core/test_framework/test_proxy_service.h new file mode 100644 index 0000000000..eb54e6f183 --- /dev/null +++ b/yt/yt/core/test_framework/test_proxy_service.h @@ -0,0 +1,184 @@ +#pragma once + +#include "public.h" + +#include <yt/yt/library/query/base/public.h> + +#include <yt/yt/core/bus/public.h> +#include <yt/yt/core/bus/bus.h> + +#include <yt/yt/core/net/address.h> + +#include <yt/yt/core/rpc/public.h> +#include <yt/yt/core/rpc/channel.h> + +#include <yt/yt/core/rpc/bus/channel.h> + +#include <yt/yt/core/logging/log.h> + +#include <yt/yt/core/misc/atomic_object.h> + +#include <yt/yt/core/ytree/attributes.h> + +#include <library/cpp/testing/common/network.h> + +namespace NYT::NRpc { + +//////////////////////////////////////////////////////////////////////////////// + +class TTestChannelFactory + : public IChannelFactory +{ +public: + TTestChannelFactory( + THashMap<TString, TRealmIdServiceMap> addressToServices, + TRealmIdServiceMap defaultServices); + + IChannelPtr CreateChannel(const TString& address) override; + +private: + const THashMap<TString, TRealmIdServiceMap> AddressToServices_; + const TRealmIdServiceMap DefaultServices_; +}; + +DEFINE_REFCOUNTED_TYPE(TTestChannelFactory); + +//////////////////////////////////////////////////////////////////////////////// + +class TTestBus + : public ::NYT::NBus::IBus +{ +public: + explicit TTestBus(TString address); + + const TString& GetEndpointDescription() const override; + + const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; + + const TString& GetEndpointAddress() const override; + + const NNet::TNetworkAddress& GetEndpointNetworkAddress() const override; + + ::NYT::NBus::TBusNetworkStatistics GetNetworkStatistics() const override; + + bool IsEndpointLocal() const override; + + bool IsEncrypted() const override; + + TFuture<void> GetReadyFuture() const override; + + TFuture<void> Send(TSharedRefArray message, const ::NYT::NBus::TSendOptions& options = {}) override; + + void SetTosLevel(::NYT::NBus::TTosLevel tosLevel) override; + + void Terminate(const TError& error) override; + + TSharedRefArray GetMessage() const; + + TFuture<void> GetReadyResponseFuture() const; + + DECLARE_SIGNAL_OVERRIDE(void(const TError&), Terminated); + +private: + const TString Address_; + const NYTree::IAttributeDictionaryPtr Attributes_; + const NNet::TNetworkAddress NetworkAddress_; + + TPromise<void> ReadyPromise_ = NewPromise<void>(); + TSharedRefArray Message_; + + TSingleShotCallbackList<void(const TError&)> Terminated_; +}; + +DEFINE_REFCOUNTED_TYPE(TTestBus) + +//////////////////////////////////////////////////////////////////////////////// + +class TTestChannel + : public IChannel +{ +public: + TTestChannel( + TRealmIdServiceMap services, + TRealmIdServiceMap defaultServices, + TString address); + + const TString& GetEndpointDescription() const override; + + const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; + + IClientRequestControlPtr Send( + IClientRequestPtr request, + IClientResponseHandlerPtr responseHandler, + const TSendOptions& options) override; + + void Terminate(const TError& error) override; + + int GetInflightRequestCount() override; + + void SubscribeTerminated(const TCallback<void(const TError&)>& callback) override; + + void UnsubscribeTerminated(const TCallback<void(const TError&)>& callback) override; + +private: + const TRealmIdServiceMap Services_; + const TRealmIdServiceMap DefaultServices_; + const TString Address_; + const NYTree::IAttributeDictionaryPtr Attributes_; + + TSingleShotCallbackList<void(const TError&)> Terminated_; + + std::atomic<bool> TerminationFlag_ = false; + TAtomicObject<TError> TerminationError_; + + THashMap<std::pair<TString, TGuid>, TTestBusPtr> RequestToBus_; + + void HandleRequestResult( + TString address, + TGuid requestId, + IClientResponseHandlerPtr responseHandler, + const TError& error); + + const IServicePtr& GetServiceOrThrow(const TServiceId& serviceId) const; +}; + +DEFINE_REFCOUNTED_TYPE(TTestChannel); + +//////////////////////////////////////////////////////////////////////////////// + +class TTestClientRequestControl + : public IClientRequestControl +{ +public: + TTestClientRequestControl(IServicePtr service, TRequestId requestId); + + void Cancel() override; + + TFuture<void> SendStreamingPayload(const TStreamingPayload& payload) override; + + TFuture<void> SendStreamingFeedback(const TStreamingFeedback& feedback) override; + +private: + const IServicePtr Service_; + const TRequestId RequestId_; +}; + +DEFINE_REFCOUNTED_TYPE(TTestClientRequestControl); + +//////////////////////////////////////////////////////////////////////////////// + +template <class TAddressContainer, class TDefaultContainer> +IChannelFactoryPtr CreateTestChannelFactory( + const THashMap<TString, TAddressContainer>& addressToServices, + const TDefaultContainer& defaultServices = {}); + +template <class TDefaultContainer> +IChannelFactoryPtr CreateTestChannelFactoryWithDefaultServices(const TDefaultContainer& defaultServices); + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NRpc + +#define TEST_PROXY_SERVICE_INL_H_ +#include "test_proxy_service-inl.h" +#undef TEST_PROXY_SERVICE_INL_H_ diff --git a/yt/yt/core/test_framework/ya.make b/yt/yt/core/test_framework/ya.make index 909b739a08..0bfc0546f5 100644 --- a/yt/yt/core/test_framework/ya.make +++ b/yt/yt/core/test_framework/ya.make @@ -6,6 +6,7 @@ SRCS( fixed_growth_string_output.cpp test_memory_tracker.cpp test_server_host.cpp + test_proxy_service.cpp GLOBAL framework.cpp ) diff --git a/yt/yt/library/query/base/public.h b/yt/yt/library/query/base/public.h new file mode 100644 index 0000000000..72f4315ee2 --- /dev/null +++ b/yt/yt/library/query/base/public.h @@ -0,0 +1,160 @@ +#pragma once + +#include <yt/yt/client/query_client/public.h> + +#include <yt/yt/client/transaction_client/public.h> + +#include <yt/yt/client/table_client/public.h> + +#include <yt/yt/core/ypath/public.h> + +namespace NYT::NQueryClient { + +using NTransactionClient::TTimestamp; + +using NTableClient::TRowRange; + +using TReadSessionId = TGuid; + +struct TDataSplit; + +//////////////////////////////////////////////////////////////////////////////// + +namespace NProto { + +class TColumnDescriptor; +class TExpression; +class TGroupClause; +class TProjectClause; +class TWhenThenExpression; +class TJoinClause; +class TQuery; +class TQueryOptions; +class TDataSource; + +} // namespace NProto + +//////////////////////////////////////////////////////////////////////////////// + +DECLARE_REFCOUNTED_STRUCT(TExpression) +using TConstExpressionPtr = TIntrusivePtr<const TExpression>; + +DECLARE_REFCOUNTED_STRUCT(TFunctionExpression) +using TConstFunctionExpressionPtr = TIntrusivePtr<const TFunctionExpression>; + +DECLARE_REFCOUNTED_STRUCT(TAggregateFunctionExpression) +using TConstAggregateFunctionExpressionPtr = TIntrusivePtr<const TAggregateFunctionExpression>; + +DECLARE_REFCOUNTED_STRUCT(TArrayJoinClause) +using TConstArrayJoinClausePtr = TIntrusivePtr<const TArrayJoinClause>; + +DECLARE_REFCOUNTED_STRUCT(TJoinClause) +using TConstJoinClausePtr = TIntrusivePtr<const TJoinClause>; + +DECLARE_REFCOUNTED_STRUCT(TGroupClause) +using TConstGroupClausePtr = TIntrusivePtr<const TGroupClause>; + +DECLARE_REFCOUNTED_STRUCT(TOrderClause) +using TConstOrderClausePtr = TIntrusivePtr<const TOrderClause>; + +DECLARE_REFCOUNTED_STRUCT(TProjectClause) +using TConstProjectClausePtr = TIntrusivePtr<const TProjectClause>; + +DECLARE_REFCOUNTED_STRUCT(TWhenThenExpression) +using TConstWhenThenExpressionPtr = TIntrusivePtr<const TWhenThenExpression>; + +DECLARE_REFCOUNTED_STRUCT(TBaseQuery) +using TConstBaseQueryPtr = TIntrusivePtr<const TBaseQuery>; + +DECLARE_REFCOUNTED_STRUCT(TFrontQuery) +using TConstFrontQueryPtr = TIntrusivePtr<const TFrontQuery>; + +DECLARE_REFCOUNTED_STRUCT(TQuery) +using TConstQueryPtr = TIntrusivePtr<const TQuery>; + +struct IPrepareCallbacks; + +struct TQueryStatistics; + +struct TQueryOptions; + +DECLARE_REFCOUNTED_STRUCT(IAggregateFunctionDescriptor) + +DECLARE_REFCOUNTED_STRUCT(ICallingConvention) + +DECLARE_REFCOUNTED_STRUCT(IExecutor) + +DECLARE_REFCOUNTED_STRUCT(IEvaluator) + +DECLARE_REFCOUNTED_CLASS(TExecutorConfig) + +DECLARE_REFCOUNTED_STRUCT(IColumnEvaluatorCache) +DECLARE_REFCOUNTED_CLASS(TColumnEvaluator) +DECLARE_REFCOUNTED_CLASS(TColumnEvaluatorCacheConfig) +DECLARE_REFCOUNTED_CLASS(TColumnEvaluatorCacheDynamicConfig) + +DECLARE_REFCOUNTED_STRUCT(IExpressionEvaluatorCache) +DECLARE_REFCOUNTED_CLASS(TExpressionEvaluator) +DECLARE_REFCOUNTED_CLASS(TExpressionEvaluatorCacheConfig) + +DECLARE_REFCOUNTED_STRUCT(TExternalCGInfo) +using TConstExternalCGInfoPtr = TIntrusivePtr<const TExternalCGInfo>; + +DECLARE_REFCOUNTED_STRUCT(TTypeInferrerMap) +using TConstTypeInferrerMapPtr = TIntrusivePtr<const TTypeInferrerMap>; + +const TConstTypeInferrerMapPtr GetBuiltinTypeInferrers(); + +DECLARE_REFCOUNTED_STRUCT(IFunctionRegistry) +DECLARE_REFCOUNTED_STRUCT(ITypeInferrer) + +DECLARE_REFCOUNTED_CLASS(TFunctionImplCache) + +using NTableClient::ISchemafulUnversionedReader; +using NTableClient::ISchemafulUnversionedReaderPtr; +using NTableClient::ISchemalessUnversionedReader; +using NTableClient::ISchemalessUnversionedReaderPtr; +using NTableClient::IUnversionedRowsetWriter; +using NTableClient::IUnversionedRowsetWriterPtr; +using NTableClient::EValueType; +using NTableClient::TTableSchema; +using NTableClient::TTableSchemaPtr; +using NTableClient::TColumnSchema; +using NTableClient::TKeyColumns; +using NTableClient::TColumnFilter; +using NTableClient::TRowRange; + +using NTransactionClient::TTimestamp; +using NTransactionClient::NullTimestamp; + +using NTableClient::TRowBuffer; +using NTableClient::TRowBufferPtr; + +using TSchemaColumns = std::vector<NTableClient::TColumnSchema>; + +using TRow = NTableClient::TUnversionedRow; +using TMutableRow = NTableClient::TMutableUnversionedRow; +using TRowHeader = NTableClient::TUnversionedRowHeader; +using TRowBuilder = NTableClient::TUnversionedRowBuilder; +using TOwningRow = NTableClient::TUnversionedOwningRow; +using TOwningRowBuilder = NTableClient::TUnversionedOwningRowBuilder; +using TValue = NTableClient::TUnversionedValue; +using TValueData = NTableClient::TUnversionedValueData; +using TOwningValue = NTableClient::TUnversionedOwningValue; +using TLegacyOwningKey = NTableClient::TLegacyOwningKey; + +using TKeyRange = std::pair<TLegacyOwningKey, TLegacyOwningKey>; +using TMutableRowRange = std::pair<TMutableRow, TMutableRow>; +using TRowRanges = std::vector<TRowRange>; +using TMutableRowRanges = std::vector<TMutableRowRange>; + +using TColumnSet = THashSet<TString>; + +//////////////////////////////////////////////////////////////////////////////// + +extern const NYPath::TYPath QueryPoolsPath; + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NQueryClient + |