diff options
author | gryzlov-ad <gryzlov-ad@yandex-team.com> | 2024-05-28 14:35:00 +0300 |
---|---|---|
committer | gryzlov-ad <gryzlov-ad@yandex-team.com> | 2024-05-28 14:46:55 +0300 |
commit | ef300d1744d8f1a7449b0e76e21855111042c25a (patch) | |
tree | d4e170a84db5b6c612f0c19f0318f971817a50a6 | |
parent | bbb72f5da0f3bd15c1b8316133b17c8eb221cd2b (diff) | |
download | ydb-ef300d1744d8f1a7449b0e76e21855111042c25a.tar.gz |
Introduce watermark row merger
f1dc39ecbe30b4320f69cbe4c7198a21d23ee9f5
-rw-r--r-- | yt/yt/client/table_client/logical_type.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/tablet_client/public.h | 5 | ||||
-rw-r--r-- | yt/yt/client/tablet_client/watermark_runtime_data.cpp | 15 | ||||
-rw-r--r-- | yt/yt/client/tablet_client/watermark_runtime_data.h | 27 | ||||
-rw-r--r-- | yt/yt/client/ya.make | 1 |
5 files changed, 48 insertions, 2 deletions
diff --git a/yt/yt/client/table_client/logical_type.cpp b/yt/yt/client/table_client/logical_type.cpp index a00879b84a..2fec0be07e 100644 --- a/yt/yt/client/table_client/logical_type.cpp +++ b/yt/yt/client/table_client/logical_type.cpp @@ -99,7 +99,7 @@ const T& VerifiedCast(const F& from) TLogicalType::TLogicalType(ELogicalMetatype type) : Metatype_(type) -{} +{ } const TSimpleLogicalType& TLogicalType::AsSimpleTypeRef() const { diff --git a/yt/yt/client/tablet_client/public.h b/yt/yt/client/tablet_client/public.h index e2bc658175..5c62fac79f 100644 --- a/yt/yt/client/tablet_client/public.h +++ b/yt/yt/client/tablet_client/public.h @@ -224,9 +224,12 @@ DEFINE_ENUM(ESecondaryIndexKind, ); DEFINE_ENUM(ERowMergerType, - (Legacy) + ((Legacy) (0)) + ((Watermark) (1)) ); +struct TWatermarkRuntimeData; + //////////////////////////////////////////////////////////////////////////////// DECLARE_REFCOUNTED_CLASS(TTableMountCacheConfig) diff --git a/yt/yt/client/tablet_client/watermark_runtime_data.cpp b/yt/yt/client/tablet_client/watermark_runtime_data.cpp new file mode 100644 index 0000000000..cdcfc86704 --- /dev/null +++ b/yt/yt/client/tablet_client/watermark_runtime_data.cpp @@ -0,0 +1,15 @@ +#include "watermark_runtime_data.h" + +namespace NYT::NTabletClient { + +//////////////////////////////////////////////////////////////////////////////// + +void TWatermarkRuntimeData::Register(TRegistrar registrar) +{ + registrar.Parameter("column_name", &TThis::ColumnName); + registrar.Parameter("watermark", &TThis::Watermark); +} + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NTabletClient diff --git a/yt/yt/client/tablet_client/watermark_runtime_data.h b/yt/yt/client/tablet_client/watermark_runtime_data.h new file mode 100644 index 0000000000..572acf5d99 --- /dev/null +++ b/yt/yt/client/tablet_client/watermark_runtime_data.h @@ -0,0 +1,27 @@ +#pragma once + +#include "public.h" + +#include <yt/yt/core/ytree/yson_struct.h> + +namespace NYT::NTabletClient { + +//////////////////////////////////////////////////////////////////////////////// + +struct TWatermarkRuntimeData + : public NYTree::TYsonStructLite +{ + TString ColumnName; + ui64 Watermark; + + // Should be set manually using table schema after ColumnName is known. + int ColumnIndex; + + REGISTER_YSON_STRUCT_LITE(TWatermarkRuntimeData); + + static void Register(TRegistrar registrar); +}; + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT::NTabletClient diff --git a/yt/yt/client/ya.make b/yt/yt/client/ya.make index e51923f956..dcc351632c 100644 --- a/yt/yt/client/ya.make +++ b/yt/yt/client/ya.make @@ -139,6 +139,7 @@ SRCS( table_client/record_helpers.cpp tablet_client/config.cpp + tablet_client/watermark_runtime_data.cpp tablet_client/table_mount_cache_detail.cpp tablet_client/table_mount_cache.cpp tablet_client/public.cpp |