aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ydb/core/tablet_flat/flat_comp_shard.cpp6
-rw-r--r--ydb/core/tablet_flat/flat_comp_shard.h16
-rw-r--r--ydb/core/tablet_flat/flat_dbase_annex.h2
-rw-r--r--ydb/core/tablet_flat/flat_executor_ut.cpp2
-rw-r--r--ydb/core/tablet_flat/flat_mem_iter.h8
-rw-r--r--ydb/core/tablet_flat/flat_mem_warm.h2
-rw-r--r--ydb/core/tablet_flat/flat_ops_compact.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_base.h4
-rw-r--r--ydb/core/tablet_flat/flat_page_blobs.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_bloom.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_data.h6
-rw-r--r--ydb/core/tablet_flat/flat_page_frames.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_gstat.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_index.h6
-rw-r--r--ydb/core/tablet_flat/flat_page_label.cpp6
-rw-r--r--ydb/core/tablet_flat/flat_page_label.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_txidstat.h2
-rw-r--r--ydb/core/tablet_flat/flat_page_txstatus.h2
-rw-r--r--ydb/core/tablet_flat/flat_part_charge.h12
-rw-r--r--ydb/core/tablet_flat/flat_part_iter_multi.h16
-rw-r--r--ydb/core/tablet_flat/flat_part_scheme.h2
-rw-r--r--ydb/core/tablet_flat/flat_part_shrink.h4
-rw-r--r--ydb/core/tablet_flat/flat_part_slice.cpp12
-rw-r--r--ydb/core/tablet_flat/flat_part_slice.h24
-rw-r--r--ydb/core/tablet_flat/flat_part_store.h2
-rw-r--r--ydb/core/tablet_flat/flat_part_writer.h8
-rw-r--r--ydb/core/tablet_flat/flat_range_cache.cpp2
-rw-r--r--ydb/core/tablet_flat/flat_range_cache.h4
-rw-r--r--ydb/core/tablet_flat/flat_range_cache_ut.cpp4
-rw-r--r--ydb/core/tablet_flat/flat_row_celled.h2
-rw-r--r--ydb/core/tablet_flat/flat_row_misc.h2
-rw-r--r--ydb/core/tablet_flat/flat_row_nulls.h34
-rw-r--r--ydb/core/tablet_flat/flat_row_scheme.h12
-rw-r--r--ydb/core/tablet_flat/flat_scan_iface.h4
-rw-r--r--ydb/core/tablet_flat/flat_stat_part.h6
-rw-r--r--ydb/core/tablet_flat/flat_stat_table.h4
-rw-r--r--ydb/core/tablet_flat/flat_table_part.cpp6
-rw-r--r--ydb/core/tablet_flat/flat_table_part.h34
-rw-r--r--ydb/core/tablet_flat/test/libs/table/test_comp.h2
-rw-r--r--ydb/core/tablet_flat/test/libs/table/test_part.h4
-rw-r--r--ydb/core/tablet_flat/test/libs/table/test_store.h2
-rw-r--r--ydb/core/tablet_flat/test/libs/table/wrap_iter.h2
-rw-r--r--ydb/core/tablet_flat/test/tool/perf/do_mem.h2
-rw-r--r--ydb/core/tablet_flat/test/tool/perf/do_part.h2
-rw-r--r--ydb/core/tablet_flat/ut/flat_comp_ut_common.h4
-rw-r--r--ydb/core/tablet_flat/ut/ut_pages.cpp2
-rw-r--r--ydb/core/tablet_flat/ut/ut_slice_loader.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard__build_index.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard__conditional_erase_rows.cpp2
-rw-r--r--ydb/core/tx/datashard/datashard__kqp_scan.cpp4
-rw-r--r--ydb/core/tx/datashard/datashard__read_columns.cpp4
-rw-r--r--ydb/core/tx/datashard/export_scan.cpp2
-rw-r--r--ydb/core/tx/datashard/read_table_scan.cpp2
53 files changed, 153 insertions, 153 deletions
diff --git a/ydb/core/tablet_flat/flat_comp_shard.cpp b/ydb/core/tablet_flat/flat_comp_shard.cpp
index a3a58f923e..b2356799de 100644
--- a/ydb/core/tablet_flat/flat_comp_shard.cpp
+++ b/ydb/core/tablet_flat/flat_comp_shard.cpp
@@ -455,7 +455,7 @@ namespace NCompShard {
}
}
- bool TTableShard::FindSplitKey(TSerializedCellVec& foundKey, const TKeyNulls& nulls) const noexcept {
+ bool TTableShard::FindSplitKey(TSerializedCellVec& foundKey, const TKeyCellDefaults& nulls) const noexcept {
TSplitStatIterator it(nulls);
for (const auto& kvInfo : Parts) {
@@ -507,7 +507,7 @@ namespace NCompShard {
}
bool TSliceSplitOp::Execute(IPages* env) {
- const TIntrusiveConstPtr<TKeyNulls> nulls = Table->RowScheme->Keys;
+ const TIntrusiveConstPtr<TKeyCellDefaults> nulls = Table->RowScheme->Keys;
TVector<TCell> keyCellsBuffer(nulls->Size());
auto getKeyCells = [this, &nulls, &keyCellsBuffer](ui64 keyId) {
@@ -691,7 +691,7 @@ namespace NCompShard {
TIntrusiveConstPtr<TRowScheme> rowScheme,
TVector<const TBounds*>& input) noexcept
{
- const TKeyNulls& nulls = *rowScheme->Keys;
+ const TKeyCellDefaults& nulls = *rowScheme->Keys;
// Sorts heap by the first key (returns true when a->FirstKey < b->FirstKey)
auto heapByFirstKeyMin = [&nulls](const TBounds* b, const TBounds* a) noexcept -> bool {
diff --git a/ydb/core/tablet_flat/flat_comp_shard.h b/ydb/core/tablet_flat/flat_comp_shard.h
index e302452134..68393ee9f6 100644
--- a/ydb/core/tablet_flat/flat_comp_shard.h
+++ b/ydb/core/tablet_flat/flat_comp_shard.h
@@ -100,7 +100,7 @@ namespace NCompShard {
*/
class TSplitStatIterator {
public:
- TSplitStatIterator(const TKeyNulls& nulls)
+ TSplitStatIterator(const TKeyCellDefaults& nulls)
: Nulls(nulls)
, InitQueue(TCmpHeapByFirstKey{Nulls})
, NextQueue(TCmpHeapByNextKey{Nulls})
@@ -148,19 +148,19 @@ namespace NCompShard {
};
struct TCmpHeapByFirstKey {
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
bool operator()(const TItemState* b, const TItemState* a) const noexcept;
};
struct TCmpHeapByNextKey {
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
bool operator()(const TItemState* b, const TItemState* a) const noexcept;
};
struct TCmpHeapByLastKey {
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
bool operator()(const TItemState* b, const TItemState* a) const noexcept;
};
@@ -176,7 +176,7 @@ namespace NCompShard {
void InitPageSize(TItemState* item) const noexcept;
private:
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
TVector<TCell> Key;
TDeque<TItemState> Items;
TItemQueue<TCmpHeapByFirstKey> InitQueue;
@@ -195,7 +195,7 @@ namespace NCompShard {
*/
class TPageReuseBuilder {
public:
- TPageReuseBuilder(const TKeyNulls& nulls)
+ TPageReuseBuilder(const TKeyCellDefaults& nulls)
: Nulls(nulls)
{ }
@@ -257,7 +257,7 @@ namespace NCompShard {
};
private:
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
TDeque<TItemState> Items;
};
@@ -381,7 +381,7 @@ namespace NCompShard {
void RegisterItem(const TTablePart& info, TTablePart::TItem& item, bool isGarbage) noexcept;
- bool FindSplitKey(TSerializedCellVec& foundKey, const TKeyNulls& nulls) const noexcept;
+ bool FindSplitKey(TSerializedCellVec& foundKey, const TKeyCellDefaults& nulls) const noexcept;
};
/**
diff --git a/ydb/core/tablet_flat/flat_dbase_annex.h b/ydb/core/tablet_flat/flat_dbase_annex.h
index 754103c95d..1a52eddca9 100644
--- a/ydb/core/tablet_flat/flat_dbase_annex.h
+++ b/ydb/core/tablet_flat/flat_dbase_annex.h
@@ -39,7 +39,7 @@ namespace NTable {
{
Y_VERIFY(Lookup(table) && data.size() >= Family->Large);
- auto blob = NPage::THello::Wrap(data, EPage::Opaque, 0);
+ auto blob = NPage::TLabelWrapper::Wrap(data, EPage::Opaque, 0);
const TLogoBlobID fake(0, 0, 0, Room->Blobs, blob.size(), 0);
diff --git a/ydb/core/tablet_flat/flat_executor_ut.cpp b/ydb/core/tablet_flat/flat_executor_ut.cpp
index c9cf528971..6eafc0ad96 100644
--- a/ydb/core/tablet_flat/flat_executor_ut.cpp
+++ b/ydb/core/tablet_flat/flat_executor_ut.cpp
@@ -276,7 +276,7 @@ public:
}
private:
- THello Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
+ TInitialState Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
{
Driver = driver;
Scheme = std::move(scheme);
diff --git a/ydb/core/tablet_flat/flat_mem_iter.h b/ydb/core/tablet_flat/flat_mem_iter.h
index 5d1c4fdf25..063d52d78d 100644
--- a/ydb/core/tablet_flat/flat_mem_iter.h
+++ b/ydb/core/tablet_flat/flat_mem_iter.h
@@ -20,7 +20,7 @@ namespace NTable {
using TCells = TArrayRef<const TCell>;
TMemIt(const TMemTable* memTable,
- TIntrusiveConstPtr<TKeyNulls> nulls,
+ TIntrusiveConstPtr<TKeyCellDefaults> nulls,
const TRemap* remap,
IPages *env,
NMem::TTreeIterator iterator)
@@ -41,7 +41,7 @@ namespace NTable {
const NMem::TTreeSnapshot& snapshot,
TCells key,
ESeek seek,
- TIntrusiveConstPtr<TKeyNulls> nulls,
+ TIntrusiveConstPtr<TKeyCellDefaults> nulls,
const TRemap *remap,
IPages *env,
EDirection direction = EDirection::Forward) noexcept
@@ -322,7 +322,7 @@ namespace NTable {
const auto ref = up.Value.AsValue<ui64>();
if (auto blob = Env->Locate(MemTable, ref, up.Tag)) {
- const auto got = NPage::THello().Read(**blob);
+ const auto got = NPage::TLabelWrapper().Read(**blob);
Y_VERIFY(got == NPage::ECodec::Plain && got.Version == 0);
@@ -349,7 +349,7 @@ namespace NTable {
public:
const TMemTable *MemTable = nullptr;
- const TIntrusiveConstPtr<TKeyNulls> Nulls;
+ const TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
const TRemap* Remap = nullptr;
IPages * const Env = nullptr;
ui64 InvisibleRowSkips = 0;
diff --git a/ydb/core/tablet_flat/flat_mem_warm.h b/ydb/core/tablet_flat/flat_mem_warm.h
index 96bb9d65fa..efcd425c12 100644
--- a/ydb/core/tablet_flat/flat_mem_warm.h
+++ b/ydb/core/tablet_flat/flat_mem_warm.h
@@ -25,7 +25,7 @@ namespace NMem {
struct TPoint {
TArrayRef<const TCell> Key;
- const TKeyNulls &Nulls;
+ const TKeyCellDefaults &Nulls;
};
struct TCandidate {
diff --git a/ydb/core/tablet_flat/flat_ops_compact.h b/ydb/core/tablet_flat/flat_ops_compact.h
index 2ac81c4113..9e2acd4fc0 100644
--- a/ydb/core/tablet_flat/flat_ops_compact.h
+++ b/ydb/core/tablet_flat/flat_ops_compact.h
@@ -94,7 +94,7 @@ namespace NTabletFlatExecutor {
Logger = new NUtil::TLogger(sys, NKikimrServices::OPS_COMPACT);
}
- THello Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
+ TInitialState Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
{
TActivationContext::AsActorContext().RegisterWithSameMailbox(this);
diff --git a/ydb/core/tablet_flat/flat_page_base.h b/ydb/core/tablet_flat/flat_page_base.h
index 8ec91c0956..ca4ae27e32 100644
--- a/ydb/core/tablet_flat/flat_page_base.h
+++ b/ydb/core/tablet_flat/flat_page_base.h
@@ -269,7 +269,7 @@ template <typename TRecord>
struct TCompare {
using TColumns = TArrayRef<const TPartScheme::TColumn>;
- TCompare(TColumns keys, const TKeyNulls &nulls)
+ TCompare(TColumns keys, const TKeyCellDefaults &nulls)
: Info(keys)
, Nulls(nulls)
{
@@ -300,7 +300,7 @@ struct TCompare {
private:
const TColumns Info;
- const TKeyNulls &Nulls;
+ const TKeyCellDefaults &Nulls;
};
diff --git a/ydb/core/tablet_flat/flat_page_blobs.h b/ydb/core/tablet_flat/flat_page_blobs.h
index c5fdb7571e..fc3c7309a9 100644
--- a/ydb/core/tablet_flat/flat_page_blobs.h
+++ b/ydb/core/tablet_flat/flat_page_blobs.h
@@ -37,7 +37,7 @@ namespace NPage {
{
Y_VERIFY(uintptr_t(Raw.data()) % alignof(TEntry) == 0);
- auto got = NPage::THello().Read(Raw, EPage::Globs);
+ auto got = NPage::TLabelWrapper().Read(Raw, EPage::Globs);
Y_VERIFY(got == ECodec::Plain && got.Version == 1);
diff --git a/ydb/core/tablet_flat/flat_page_bloom.h b/ydb/core/tablet_flat/flat_page_bloom.h
index 1244d0e2ea..7d0e64a41a 100644
--- a/ydb/core/tablet_flat/flat_page_bloom.h
+++ b/ydb/core/tablet_flat/flat_page_bloom.h
@@ -27,7 +27,7 @@ namespace NPage {
TBloom(TSharedData page)
: Raw(std::move(page))
{
- const auto got = NPage::THello().Read(Raw, EPage::Bloom);
+ const auto got = NPage::TLabelWrapper().Read(Raw, EPage::Bloom);
Y_VERIFY(got == ECodec::Plain && got.Version == 0);
diff --git a/ydb/core/tablet_flat/flat_page_data.h b/ydb/core/tablet_flat/flat_page_data.h
index aab03c724d..07422d27d7 100644
--- a/ydb/core/tablet_flat/flat_page_data.h
+++ b/ydb/core/tablet_flat/flat_page_data.h
@@ -190,7 +190,7 @@ namespace NPage {
if (Raw = raw ? *raw : TSharedData{ }) {
const void* base = Raw.data();
- auto got = NPage::THello().Read(Raw, EPage::DataPage);
+ auto got = NPage::TLabelWrapper().Read(Raw, EPage::DataPage);
Y_VERIFY(got.Version == 1, "Unknown EPage::DataPage version");
@@ -229,7 +229,7 @@ namespace NPage {
}
TIter LookupKey(TCells key, const TPartScheme::TGroupInfo &group,
- ESeek seek, const TKeyNulls *nulls) const noexcept
+ ESeek seek, const TKeyCellDefaults *nulls) const noexcept
{
if (!key) {
switch (seek) {
@@ -266,7 +266,7 @@ namespace NPage {
}
TIter LookupKeyReverse(TCells key, const TPartScheme::TGroupInfo &group,
- ESeek seek, const TKeyNulls *nulls) const noexcept
+ ESeek seek, const TKeyCellDefaults *nulls) const noexcept
{
if (!key) {
switch (seek) {
diff --git a/ydb/core/tablet_flat/flat_page_frames.h b/ydb/core/tablet_flat/flat_page_frames.h
index 0edcc1eacc..699b8303ea 100644
--- a/ydb/core/tablet_flat/flat_page_frames.h
+++ b/ydb/core/tablet_flat/flat_page_frames.h
@@ -74,7 +74,7 @@ namespace NPage {
{
Y_VERIFY(uintptr_t(Raw.data()) % alignof(TEntry) == 0);
- auto got = NPage::THello().Read(Raw, EPage::Frames);
+ auto got = NPage::TLabelWrapper().Read(Raw, EPage::Frames);
Y_VERIFY(got == ECodec::Plain && got.Version == 0);
Y_VERIFY(got.Page.size() > sizeof(THeader), "Damaged page");
diff --git a/ydb/core/tablet_flat/flat_page_gstat.h b/ydb/core/tablet_flat/flat_page_gstat.h
index 86f6d8d455..0ee555a362 100644
--- a/ydb/core/tablet_flat/flat_page_gstat.h
+++ b/ydb/core/tablet_flat/flat_page_gstat.h
@@ -42,7 +42,7 @@ namespace NPage {
TGarbageStats(TSharedData page)
: Raw(std::move(page))
{
- const auto got = NPage::THello().Read(Raw, EPage::GarbageStats);
+ const auto got = NPage::TLabelWrapper().Read(Raw, EPage::GarbageStats);
Y_VERIFY(got == ECodec::Plain && got.Version == 0);
diff --git a/ydb/core/tablet_flat/flat_page_index.h b/ydb/core/tablet_flat/flat_page_index.h
index 467e2303d1..e936891d0c 100644
--- a/ydb/core/tablet_flat/flat_page_index.h
+++ b/ydb/core/tablet_flat/flat_page_index.h
@@ -62,7 +62,7 @@ namespace NPage {
TIndex(TSharedData raw)
: Raw(std::move(raw))
{
- const auto got = NPage::THello().Read(Raw, EPage::Index);
+ const auto got = NPage::TLabelWrapper().Read(Raw, EPage::Index);
Y_VERIFY(got == ECodec::Plain && (got.Version == 2 || got.Version == 3));
@@ -175,7 +175,7 @@ namespace NPage {
*/
TIter LookupKey(
TCells key, const TPartScheme::TGroupInfo &group,
- const ESeek seek, const TKeyNulls *nulls) const noexcept
+ const ESeek seek, const TKeyCellDefaults *nulls) const noexcept
{
if (!key) {
// Special treatment for an empty key
@@ -219,7 +219,7 @@ namespace NPage {
*/
TIter LookupKeyReverse(
TCells key, const TPartScheme::TGroupInfo &group,
- const ESeek seek, const TKeyNulls *nulls) const noexcept
+ const ESeek seek, const TKeyCellDefaults *nulls) const noexcept
{
if (!key) {
// Special treatment for an empty key
diff --git a/ydb/core/tablet_flat/flat_page_label.cpp b/ydb/core/tablet_flat/flat_page_label.cpp
index 2dba104370..78586bda02 100644
--- a/ydb/core/tablet_flat/flat_page_label.cpp
+++ b/ydb/core/tablet_flat/flat_page_label.cpp
@@ -18,7 +18,7 @@ namespace NPage {
Size = Y_LIKELY(size < Max<ui32>()) ? ui32(size) : Max<ui32>();
}
- THello::TResult THello::Read(TArrayRef<const char> raw, EPage type) const noexcept
+ TLabelWrapper::TResult TLabelWrapper::Read(TArrayRef<const char> raw, EPage type) const noexcept
{
auto label = TDeref<TLabel>::Copy(raw.begin(), 0);
@@ -55,7 +55,7 @@ namespace NPage {
}
}
- TSharedData THello::Wrap(TArrayRef<const char> plain, EPage page, ui16 version) noexcept
+ TSharedData TLabelWrapper::Wrap(TArrayRef<const char> plain, EPage page, ui16 version) noexcept
{
Y_VERIFY(!(version >> 15), "Version can use only 15 bits");
@@ -70,7 +70,7 @@ namespace NPage {
return blob;
}
- TString THello::WrapString(TArrayRef<const char> plain, EPage page, ui16 version) noexcept
+ TString TLabelWrapper::WrapString(TArrayRef<const char> plain, EPage page, ui16 version) noexcept
{
Y_VERIFY(!(version >> 15), "Version can use only 15 bits");
diff --git a/ydb/core/tablet_flat/flat_page_label.h b/ydb/core/tablet_flat/flat_page_label.h
index eadf70983e..ef14f4bda4 100644
--- a/ydb/core/tablet_flat/flat_page_label.h
+++ b/ydb/core/tablet_flat/flat_page_label.h
@@ -23,7 +23,7 @@ namespace NPage {
static_assert(sizeof(TLabel) == 8, "Invalid page TLabel unit");
- struct THello {
+ struct TLabelWrapper {
struct TResult {
bool operator==(NPage::ECodec codec) const noexcept
{
diff --git a/ydb/core/tablet_flat/flat_page_txidstat.h b/ydb/core/tablet_flat/flat_page_txidstat.h
index c6131f2700..e58cda5c48 100644
--- a/ydb/core/tablet_flat/flat_page_txidstat.h
+++ b/ydb/core/tablet_flat/flat_page_txidstat.h
@@ -41,7 +41,7 @@ namespace NPage {
TTxIdStatsPage(TSharedData page)
: Raw(std::move(page))
{
- const auto got = NPage::THello().Read(Raw, EPage::TxIdStats);
+ const auto got = NPage::TLabelWrapper().Read(Raw, EPage::TxIdStats);
Y_VERIFY(got == ECodec::Plain && got.Version == 0);
diff --git a/ydb/core/tablet_flat/flat_page_txstatus.h b/ydb/core/tablet_flat/flat_page_txstatus.h
index 3375b43157..b7c99392a4 100644
--- a/ydb/core/tablet_flat/flat_page_txstatus.h
+++ b/ydb/core/tablet_flat/flat_page_txstatus.h
@@ -47,7 +47,7 @@ namespace NPage {
TTxStatusPage(TSharedData page)
: Raw(std::move(page))
{
- const auto got = NPage::THello().Read(Raw, EPage::TxStatus);
+ const auto got = NPage::TLabelWrapper().Read(Raw, EPage::TxStatus);
Y_VERIFY(got == ECodec::Plain && got.Version == 0);
diff --git a/ydb/core/tablet_flat/flat_part_charge.h b/ydb/core/tablet_flat/flat_part_charge.h
index 2a417a7a1b..989d551b19 100644
--- a/ydb/core/tablet_flat/flat_part_charge.h
+++ b/ydb/core/tablet_flat/flat_part_charge.h
@@ -46,7 +46,7 @@ namespace NTable {
}
static bool Range(IPages *env, const TCells key1, const TCells key2,
- const TRun &run, const TKeyNulls &nulls, TTagsRef tags,
+ const TRun &run, const TKeyCellDefaults &nulls, TTagsRef tags,
ui64 items, ui64 bytes, bool includeHistory = false) noexcept
{
if (run.size() == 1) {
@@ -102,7 +102,7 @@ namespace NTable {
}
static bool RangeReverse(IPages *env, const TCells key1, const TCells key2,
- const TRun &run, const TKeyNulls &nulls, TTagsRef tags,
+ const TRun &run, const TKeyCellDefaults &nulls, TTagsRef tags,
ui64 items, ui64 bytes, bool includeHistory = false) noexcept
{
if (run.size() == 1) {
@@ -170,7 +170,7 @@ namespace NTable {
* last key < splitKey are precharged. This method will not try to
* load pages outside of [beginRowId, endRowId) range.
*/
- bool SplitKey(const TCells splitKey, const TKeyNulls& nulls,
+ bool SplitKey(const TCells splitKey, const TKeyCellDefaults& nulls,
const TRowId beginRowId, const TRowId endRowId) const noexcept
{
Y_VERIFY_DEBUG(beginRowId < endRowId, "Unexpected empty row range");
@@ -285,7 +285,7 @@ namespace NTable {
* Precharges data for rows between max(key1, row1) and min(key2, row2) inclusive
*/
TResult Do(const TCells key1, const TCells key2, const TRowId row1,
- const TRowId row2, const TKeyNulls &nulls, ui64 itemsLimit,
+ const TRowId row2, const TKeyCellDefaults &nulls, ui64 itemsLimit,
ui64 bytesLimit) const noexcept
{
auto startRow = row1;
@@ -352,7 +352,7 @@ namespace NTable {
* Precharges data for rows between min(key1, row1) and max(key2, row2) inclusive in reverse
*/
TResult DoReverse(const TCells key1, const TCells key2, const TRowId row1,
- const TRowId row2, const TKeyNulls &nulls, ui64 itemsLimit,
+ const TRowId row2, const TKeyCellDefaults &nulls, ui64 itemsLimit,
ui64 bytesLimit) const noexcept
{
auto startRow = row1;
@@ -601,7 +601,7 @@ namespace NTable {
Y_VERIFY_DEBUG(scheme.ColsKeyIdx.size() == 3);
// Directly use the histroy key nulls with correct sort order
- const TKeyNulls* nulls = Part->Scheme->HistoryKeys.Get();
+ const TKeyCellDefaults* nulls = Part->Scheme->HistoryKeys.Get();
auto first = HistoryIndex->LookupKey(startKey, scheme, ESeek::Lower, nulls);
if (!first) {
diff --git a/ydb/core/tablet_flat/flat_part_iter_multi.h b/ydb/core/tablet_flat/flat_part_iter_multi.h
index b26d83b378..23236e27aa 100644
--- a/ydb/core/tablet_flat/flat_part_iter_multi.h
+++ b/ydb/core/tablet_flat/flat_part_iter_multi.h
@@ -136,7 +136,7 @@ namespace NTable {
EReady Seek(
const TCells key, ESeek seek,
const TPart* part, IPages* env,
- const TPartScheme::TGroupInfo& scheme, const TKeyNulls* nulls) noexcept
+ const TPartScheme::TGroupInfo& scheme, const TKeyCellDefaults* nulls) noexcept
{
Y_VERIFY_DEBUG(seek == ESeek::Exact || seek == ESeek::Lower || seek == ESeek::Upper,
"Only ESeek{Exact, Upper, Lower} are currently supported here");
@@ -208,7 +208,7 @@ namespace NTable {
EReady SeekReverse(
const TCells key, ESeek seek,
const TPart* part, IPages* env,
- const TPartScheme::TGroupInfo& scheme, const TKeyNulls* nulls) noexcept
+ const TPartScheme::TGroupInfo& scheme, const TKeyCellDefaults* nulls) noexcept
{
Y_VERIFY_DEBUG(seek == ESeek::Exact || seek == ESeek::Lower || seek == ESeek::Upper,
"Only ESeek{Exact, Upper, Lower} are currently supported here");
@@ -454,7 +454,7 @@ namespace NTable {
Y_VERIFY_DEBUG(scheme.ColsKeyData.size() == 3);
// Directly use the histroy key nulls with correct sort order
- const TKeyNulls* nulls = part->Scheme->HistoryKeys.Get();
+ const TKeyCellDefaults* nulls = part->Scheme->HistoryKeys.Get();
// Helper for loading row id and row version from the index
auto checkIndex = [&]() -> bool {
@@ -669,7 +669,7 @@ namespace NTable {
using TCells = NPage::TCells;
using TGroupId = NPage::TGroupId;
- TPartSimpleIt(const TPart* part, TTagsRef tags, TIntrusiveConstPtr<TKeyNulls> nulls, IPages* env)
+ TPartSimpleIt(const TPart* part, TTagsRef tags, TIntrusiveConstPtr<TKeyCellDefaults> nulls, IPages* env)
: Part(part)
, Env(env)
, Pinout(Part->Scheme->MakePinout(tags))
@@ -1139,7 +1139,7 @@ namespace NTable {
if (ref >> (sizeof(ui32) * 8))
Y_FAIL("Upper bits of ELargeObj ref now isn't used");
if (auto blob = Env->Locate(Part, ref, op)) {
- const auto got = NPage::THello().Read(**blob);
+ const auto got = NPage::TLabelWrapper().Read(**blob);
Y_VERIFY(got == NPage::ECodec::Plain && got.Version == 0);
@@ -1172,7 +1172,7 @@ namespace NTable {
private:
const TPinout Pinout;
- const TIntrusiveConstPtr<TKeyNulls> Nulls;
+ const TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
TPartGroupKeyIt Main;
@@ -1211,7 +1211,7 @@ namespace NTable {
public:
using TCells = NPage::TCells;
- TRunIt(const TRun& run, TTagsRef tags, TIntrusiveConstPtr<TKeyNulls> nulls, IPages* env)
+ TRunIt(const TRun& run, TTagsRef tags, TIntrusiveConstPtr<TKeyCellDefaults> nulls, IPages* env)
: Run(run)
, Tags(tags)
, Nulls(std::move(nulls))
@@ -1582,7 +1582,7 @@ namespace NTable {
public:
const TRun& Run;
TTagsRef const Tags;
- TIntrusiveConstPtr<TKeyNulls> const Nulls;
+ TIntrusiveConstPtr<TKeyCellDefaults> const Nulls;
IPages* const Env;
ui64 InvisibleRowSkips = 0;
diff --git a/ydb/core/tablet_flat/flat_part_scheme.h b/ydb/core/tablet_flat/flat_part_scheme.h
index 06c3681ee2..ea8f5a1dbb 100644
--- a/ydb/core/tablet_flat/flat_part_scheme.h
+++ b/ydb/core/tablet_flat/flat_part_scheme.h
@@ -128,7 +128,7 @@ namespace NTable {
TGroupInfo HistoryGroup;
TVector<TColumn> HistoryColumns;
- TIntrusiveConstPtr<TKeyNulls> HistoryKeys;
+ TIntrusiveConstPtr<TKeyCellDefaults> HistoryKeys;
private:
THashMap<TTag, const TColumn*> Tag2DataInfo;
diff --git a/ydb/core/tablet_flat/flat_part_shrink.h b/ydb/core/tablet_flat/flat_part_shrink.h
index f6c7cc6485..8a55f3fbf9 100644
--- a/ydb/core/tablet_flat/flat_part_shrink.h
+++ b/ydb/core/tablet_flat/flat_part_shrink.h
@@ -15,7 +15,7 @@ namespace NTable {
public:
using TCells = TArrayRef<const TCell>;
- TShrink(IPages *env, TIntrusiveConstPtr<TKeyNulls> nulls)
+ TShrink(IPages *env, TIntrusiveConstPtr<TKeyCellDefaults> nulls)
: Env(env)
, Nulls(nulls)
{
@@ -87,7 +87,7 @@ namespace NTable {
public:
IPages * const Env = nullptr;
- TIntrusiveConstPtr<TKeyNulls> Nulls;
+ TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
size_t Skipped = 0;
TVector<TPartView> PartView;
};
diff --git a/ydb/core/tablet_flat/flat_part_slice.cpp b/ydb/core/tablet_flat/flat_part_slice.cpp
index 48755d3bf4..458435b13b 100644
--- a/ydb/core/tablet_flat/flat_part_slice.cpp
+++ b/ydb/core/tablet_flat/flat_part_slice.cpp
@@ -10,7 +10,7 @@ namespace NTable {
namespace {
-void PrintCells(IOutputStream& out, TArrayRef<const TCell> cells, const TNulls& nulls) noexcept
+void PrintCells(IOutputStream& out, TArrayRef<const TCell> cells, const TCellDefaults& nulls) noexcept
{
out << '{';
size_t pos = 0;
@@ -44,7 +44,7 @@ bool ValidateSlices(TConstArrayRef<TSlice> slices) noexcept
////////////////////////////////////////////////////////////////////////////////
-int ComparePartKeys(TCellsRef left, TCellsRef right, const TKeyNulls &nulls) noexcept {
+int ComparePartKeys(TCellsRef left, TCellsRef right, const TKeyCellDefaults &nulls) noexcept {
size_t end = Max(left.size(), right.size());
Y_VERIFY_DEBUG(end <= nulls.Size(), "Key schema is smaller than compared keys");
@@ -61,7 +61,7 @@ int ComparePartKeys(TCellsRef left, TCellsRef right, const TKeyNulls &nulls) noe
////////////////////////////////////////////////////////////////////////////////
-void TBounds::Describe(IOutputStream& out, const TKeyNulls& nulls) const noexcept
+void TBounds::Describe(IOutputStream& out, const TKeyCellDefaults& nulls) const noexcept
{
auto left = FirstKey.GetCells();
auto right = LastKey.GetCells();
@@ -80,7 +80,7 @@ void TBounds::Describe(IOutputStream& out, const TKeyNulls& nulls) const noexcep
out << (LastInclusive ? ']' : ')');
}
-bool TBounds::LessByKey(const TBounds& a, const TBounds& b, const TKeyNulls& nulls) noexcept
+bool TBounds::LessByKey(const TBounds& a, const TBounds& b, const TKeyCellDefaults& nulls) noexcept
{
auto left = a.LastKey.GetCells();
auto right = b.FirstKey.GetCells();
@@ -112,7 +112,7 @@ bool TBounds::LessByKey(const TBounds& a, const TBounds& b, const TKeyNulls& nul
int TBounds::CompareSearchKeyFirstKey(
TArrayRef<const TCell> key,
const TBounds& bounds,
- const TKeyNulls& nulls) noexcept
+ const TKeyCellDefaults& nulls) noexcept
{
if (!key) {
// Search key is +inf => +inf > any
@@ -145,7 +145,7 @@ int TBounds::CompareSearchKeyFirstKey(
int TBounds::CompareLastKeySearchKey(
const TBounds& bounds,
TArrayRef<const TCell> key,
- const TKeyNulls& nulls) noexcept
+ const TKeyCellDefaults& nulls) noexcept
{
auto left = bounds.LastKey.GetCells();
if (Y_UNLIKELY(!left)) {
diff --git a/ydb/core/tablet_flat/flat_part_slice.h b/ydb/core/tablet_flat/flat_part_slice.h
index d0f361ef58..7d54e4020d 100644
--- a/ydb/core/tablet_flat/flat_part_slice.h
+++ b/ydb/core/tablet_flat/flat_part_slice.h
@@ -13,7 +13,7 @@ namespace NTable {
/**
* A very simple comparator for part keys (extended with schema defaults)
*/
- int ComparePartKeys(TCellsRef left, TCellsRef right, const TKeyNulls &nulls) noexcept;
+ int ComparePartKeys(TCellsRef left, TCellsRef right, const TKeyCellDefaults &nulls) noexcept;
/**
* Bounds for a range of keys
@@ -41,12 +41,12 @@ namespace NTable {
{
}
- void Describe(IOutputStream& out, const TKeyNulls& nulls) const noexcept;
+ void Describe(IOutputStream& out, const TKeyCellDefaults& nulls) const noexcept;
/**
* Returns true if a is less than b without any intersections
*/
- static bool LessByKey(const TBounds& a, const TBounds& b, const TKeyNulls& nulls) noexcept;
+ static bool LessByKey(const TBounds& a, const TBounds& b, const TKeyCellDefaults& nulls) noexcept;
/**
* Compares search key and bounds first key
@@ -56,7 +56,7 @@ namespace NTable {
static int CompareSearchKeyFirstKey(
TArrayRef<const TCell> key,
const TBounds& bounds,
- const TKeyNulls& nulls) noexcept;
+ const TKeyCellDefaults& nulls) noexcept;
/**
* Compares bounds last key and search key
@@ -66,7 +66,7 @@ namespace NTable {
static int CompareLastKeySearchKey(
const TBounds& bounds,
TArrayRef<const TCell> key,
- const TKeyNulls& nulls) noexcept;
+ const TKeyCellDefaults& nulls) noexcept;
};
/**
@@ -565,9 +565,9 @@ namespace NTable {
struct TCompare {
typedef void is_transparent;
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
- explicit TCompare(const TKeyNulls& nulls)
+ explicit TCompare(const TKeyCellDefaults& nulls)
: Nulls(nulls)
{
}
@@ -641,7 +641,7 @@ namespace NTable {
using iterator = TItems::iterator;
using value_type = TItem;
- explicit TRun(const TKeyNulls& nulls)
+ explicit TRun(const TKeyCellDefaults& nulls)
: Nulls(nulls)
, Slices({ }, TCompare(nulls))
{
@@ -751,7 +751,7 @@ namespace NTable {
}
private:
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
TItems Slices;
};
@@ -761,7 +761,7 @@ namespace NTable {
class TLevels {
class TItem : public TRun {
public:
- TItem(const TKeyNulls& nulls, size_t index)
+ TItem(const TKeyCellDefaults& nulls, size_t index)
: TRun(nulls)
, Index(index)
{ }
@@ -783,7 +783,7 @@ namespace NTable {
TRun::iterator Position;
};
- explicit TLevels(TIntrusiveConstPtr<TKeyNulls> nulls)
+ explicit TLevels(TIntrusiveConstPtr<TKeyCellDefaults> nulls)
: Nulls(std::move(nulls))
{
}
@@ -811,7 +811,7 @@ namespace NTable {
iterator AddLevel();
private:
- TIntrusiveConstPtr<TKeyNulls> Nulls;
+ TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
TItems Levels;
TEpoch MaxEpoch = TEpoch::Min();
};
diff --git a/ydb/core/tablet_flat/flat_part_store.h b/ydb/core/tablet_flat/flat_part_store.h
index ee0bc2324b..2a5335d1ff 100644
--- a/ydb/core/tablet_flat/flat_part_store.h
+++ b/ydb/core/tablet_flat/flat_part_store.h
@@ -48,7 +48,7 @@ protected:
public:
using TCache = NTabletFlatExecutor::TPrivatePageCache::TInfo;
- TPartStore(const TLogoBlobID &label, TEgg egg, TStat stat)
+ TPartStore(const TLogoBlobID &label, TPart::TParams egg, TStat stat)
: TPart(label, egg, stat)
{
diff --git a/ydb/core/tablet_flat/flat_part_writer.h b/ydb/core/tablet_flat/flat_part_writer.h
index 4e04732cd9..41682c4b93 100644
--- a/ydb/core/tablet_flat/flat_part_writer.h
+++ b/ydb/core/tablet_flat/flat_part_writer.h
@@ -693,7 +693,7 @@ namespace NTable {
/* Need to extract first key from page. Just written key
columns may not hold EOp::Reset cells (and now this
isn't possible technically), thus there isn't required
- TNulls object for expanding defaults.
+ TCellDefaults object for expanding defaults.
*/
Y_VERIFY(dataPage->Records, "Invalid EPage::DataPage blob");
@@ -754,13 +754,13 @@ namespace NTable {
TLargeObj Save(TRowId row, ui32 tag, TArrayRef<const char> plain) noexcept override
{
if (plain.size() >= LargeEdge && plain.size() <= MaxLargeBlob) {
- auto blob = NPage::THello::WrapString(plain, EPage::Opaque, 0);
+ auto blob = NPage::TLabelWrapper::WrapString(plain, EPage::Opaque, 0);
ui64 ref = Globs.Size(); /* is the current blob index */
return Register(row, tag, Pager.WriteLarge(std::move(blob), ref));
} else if (plain.size() >= SmallEdge) {
- auto blob = NPage::THello::Wrap(plain, EPage::Opaque, 0);
+ auto blob = NPage::TLabelWrapper::Wrap(plain, EPage::Opaque, 0);
Current.Bytes += blob.size();
Current.Coded += blob.size();
@@ -806,7 +806,7 @@ namespace NTable {
{
Y_VERIFY(codec == ECodec::LZ4, "Only LZ4 encoding allowed");
- auto got = NPage::THello().Read(page, EPage::DataPage);
+ auto got = NPage::TLabelWrapper().Read(page, EPage::DataPage);
Y_VERIFY(got == ECodec::Plain, "Page is already encoded");
Y_VERIFY(got.Page.data() - page.data() == 16, "Page compression would change page header size");
diff --git a/ydb/core/tablet_flat/flat_range_cache.cpp b/ydb/core/tablet_flat/flat_range_cache.cpp
index dbac2c7981..a489b95864 100644
--- a/ydb/core/tablet_flat/flat_range_cache.cpp
+++ b/ydb/core/tablet_flat/flat_range_cache.cpp
@@ -4,7 +4,7 @@
namespace NKikimr {
namespace NTable {
-TKeyRangeCache::TKeyRangeCache(const TKeyNulls& nulls, const TKeyRangeCacheConfig& config)
+TKeyRangeCache::TKeyRangeCache(const TKeyCellDefaults& nulls, const TKeyRangeCacheConfig& config)
: Nulls(nulls)
, Config(config)
, Pool(new TSpecialMemoryPool())
diff --git a/ydb/core/tablet_flat/flat_range_cache.h b/ydb/core/tablet_flat/flat_range_cache.h
index 2005831095..0b60d54afb 100644
--- a/ydb/core/tablet_flat/flat_range_cache.h
+++ b/ydb/core/tablet_flat/flat_range_cache.h
@@ -387,7 +387,7 @@ public:
};
public:
- TKeyRangeCache(const TKeyNulls& nulls, const TKeyRangeCacheConfig& config);
+ TKeyRangeCache(const TKeyCellDefaults& nulls, const TKeyRangeCacheConfig& config);
~TKeyRangeCache();
@@ -552,7 +552,7 @@ private:
static TCell AllocateCellCopy(TSpecialMemoryPool* pool, const TCell& cell);
private:
- const TKeyNulls& Nulls;
+ const TKeyCellDefaults& Nulls;
const TKeyRangeCacheConfig Config;
THolder<TSpecialMemoryPool> Pool;
size_t UsedHeapMemory = 0;
diff --git a/ydb/core/tablet_flat/flat_range_cache_ut.cpp b/ydb/core/tablet_flat/flat_range_cache_ut.cpp
index b5211519d9..897e3caaeb 100644
--- a/ydb/core/tablet_flat/flat_range_cache_ut.cpp
+++ b/ydb/core/tablet_flat/flat_range_cache_ut.cpp
@@ -43,11 +43,11 @@ Y_UNIT_TEST_SUITE(TFlatEraseCacheTest) {
* Returns cache tree node size in bytes
*/
size_t GetNodeSize() {
- // Construct fake TKeyNulls
+ // Construct fake TKeyCellDefaults
TVector<NScheme::TTypeIdOrder> types;
types.emplace_back(NScheme::NTypeIds::Uint64);
TVector<TCell> defs(1);
- TIntrusiveConstPtr<TKeyNulls> nulls = TKeyNulls::Make(types, defs);
+ TIntrusiveConstPtr<TKeyCellDefaults> nulls = TKeyCellDefaults::Make(types, defs);
// Empty default config
TKeyRangeCache cache(*nulls, { });
// Empty keys, both inclusive
diff --git a/ydb/core/tablet_flat/flat_row_celled.h b/ydb/core/tablet_flat/flat_row_celled.h
index a45e943dd2..42ce8bf78b 100644
--- a/ydb/core/tablet_flat/flat_row_celled.h
+++ b/ydb/core/tablet_flat/flat_row_celled.h
@@ -10,7 +10,7 @@ namespace NTable {
struct TCelled {
using TRaw = TArrayRef<const TRawTypeValue>;
- TCelled(TRaw key, const TKeyNulls &nulls, bool extend)
+ TCelled(TRaw key, const TKeyCellDefaults &nulls, bool extend)
: Size(extend ? nulls->size() : Min(nulls->size(), key.size()))
, Large(Size > Small.size() ? Size : 0)
, Cells(Large ? Large.begin() : Small.begin())
diff --git a/ydb/core/tablet_flat/flat_row_misc.h b/ydb/core/tablet_flat/flat_row_misc.h
index d7730ff06d..3001119e66 100644
--- a/ydb/core/tablet_flat/flat_row_misc.h
+++ b/ydb/core/tablet_flat/flat_row_misc.h
@@ -21,7 +21,7 @@ namespace NFmt {
}
- TCells(TCellsRef cells, const NTable::TNulls &nulls, const TReg *reg)
+ TCells(TCellsRef cells, const NTable::TCellDefaults &nulls, const TReg *reg)
: TCells(cells, nulls.Types, reg)
{
diff --git a/ydb/core/tablet_flat/flat_row_nulls.h b/ydb/core/tablet_flat/flat_row_nulls.h
index f4e664b7cc..7b5cb0fe02 100644
--- a/ydb/core/tablet_flat/flat_row_nulls.h
+++ b/ydb/core/tablet_flat/flat_row_nulls.h
@@ -10,12 +10,12 @@
namespace NKikimr {
namespace NTable {
- class TNulls: public TAtomicRefCount<TNulls, NUtil::TDtorDel<TNulls>> {
+ class TCellDefaults: public TAtomicRefCount<TCellDefaults, NUtil::TDtorDel<TCellDefaults>> {
protected:
using TType = NScheme::TTypeId;
using TOrder = NScheme::TTypeIdOrder;
- TNulls(TArrayRef<const TType> types, TArrayRef<const TCell> defs)
+ TCellDefaults(TArrayRef<const TType> types, TArrayRef<const TCell> defs)
: Types(types)
, Defs(defs)
{
@@ -23,7 +23,7 @@ namespace NTable {
}
public:
- virtual ~TNulls() = default;
+ virtual ~TCellDefaults() = default;
protected:
template<class TSelf>
@@ -104,45 +104,45 @@ namespace NTable {
/**
* Types and defaults for the complete row
*/
- class TRowNulls : public TNulls {
- friend TNulls;
+ class TRowCellDefaults : public TCellDefaults {
+ friend TCellDefaults;
- TRowNulls(
+ TRowCellDefaults(
TArrayRef<const TType> types,
TArrayRef<const TOrder> order,
TArrayRef<const TCell> defs)
- : TNulls(types, defs)
+ : TCellDefaults(types, defs)
{
Y_VERIFY(order.size() == 0);
}
public:
- static TIntrusiveConstPtr<TRowNulls> Make(
+ static TIntrusiveConstPtr<TRowCellDefaults> Make(
TArrayRef<const TType> types,
TArrayRef<const TCell> defs) noexcept
{
- return TNulls::Make<TRowNulls>(types, { }, defs);
+ return TCellDefaults::Make<TRowCellDefaults>(types, { }, defs);
}
};
/**
* Types and defaults for key columns with per-column ordering
*/
- class TKeyNulls : public TNulls {
- friend TNulls;
+ class TKeyCellDefaults : public TCellDefaults {
+ friend TCellDefaults;
- TKeyNulls(
+ TKeyCellDefaults(
TArrayRef<const TType> types,
TArrayRef<const TOrder> order,
TArrayRef<const TCell> defs)
- : TNulls(types, defs)
+ : TCellDefaults(types, defs)
, Types(order)
{
- Y_VERIFY(Types.size() == TNulls::Types.size());
+ Y_VERIFY(Types.size() == TCellDefaults::Types.size());
}
public:
- static TIntrusiveConstPtr<TKeyNulls> Make(
+ static TIntrusiveConstPtr<TKeyCellDefaults> Make(
TArrayRef<const TOrder> order,
TArrayRef<const TCell> defs) noexcept
{
@@ -151,12 +151,12 @@ namespace NTable {
for (TOrder typeOrder : order) {
types.push_back(typeOrder.GetTypeId());
}
- return TNulls::Make<TKeyNulls>(types, order, defs);
+ return TCellDefaults::Make<TKeyCellDefaults>(types, order, defs);
}
TArrayRef<const TType> BasicTypes() const noexcept
{
- return TNulls::Types;
+ return TCellDefaults::Types;
}
public:
diff --git a/ydb/core/tablet_flat/flat_row_scheme.h b/ydb/core/tablet_flat/flat_row_scheme.h
index fc750a1279..b9a05aa217 100644
--- a/ydb/core/tablet_flat/flat_row_scheme.h
+++ b/ydb/core/tablet_flat/flat_row_scheme.h
@@ -39,8 +39,8 @@ namespace NTable {
TRowScheme(
TVector<TColInfo> cols,
- TIntrusiveConstPtr<TKeyNulls> keys,
- TIntrusiveConstPtr<TRowNulls> nulls,
+ TIntrusiveConstPtr<TKeyCellDefaults> keys,
+ TIntrusiveConstPtr<TRowCellDefaults> nulls,
TVector<ui32> families)
: Cols(std::move(cols))
, Keys(std::move(keys))
@@ -66,8 +66,8 @@ namespace NTable {
keyCount += (meta.KeyOrder == Max<TPos>() ? 0 : 1);
}
- TNullsCook<TKeyNulls, NScheme::TTypeIdOrder> keys(keyCount);
- TNullsCook<TRowNulls, NScheme::TTypeId> vals(cols.size());
+ TNullsCook<TKeyCellDefaults, NScheme::TTypeIdOrder> keys(keyCount);
+ TNullsCook<TRowCellDefaults, NScheme::TTypeId> vals(cols.size());
TVector<TColInfo> info;
info.reserve(cols.size());
@@ -151,8 +151,8 @@ namespace NTable {
public:
const TVector<TColInfo> Cols;
- const TIntrusiveConstPtr<TKeyNulls> Keys;
- const TIntrusiveConstPtr<TRowNulls> Nulls;
+ const TIntrusiveConstPtr<TKeyCellDefaults> Keys;
+ const TIntrusiveConstPtr<TRowCellDefaults> Nulls;
const TVector<ui32> Families; // per-group families
private:
diff --git a/ydb/core/tablet_flat/flat_scan_iface.h b/ydb/core/tablet_flat/flat_scan_iface.h
index 6b0fa8e42d..878cb97ab3 100644
--- a/ydb/core/tablet_flat/flat_scan_iface.h
+++ b/ydb/core/tablet_flat/flat_scan_iface.h
@@ -107,12 +107,12 @@ namespace NTable {
ui64 ReadAheadHi = Max<ui64>();
};
- struct THello {
+ struct TInitialState {
EScan Scan; /* Initial scan state */
TConf Conf; /* Scan conveyer configuration */
};
- virtual THello Prepare(IDriver*, TIntrusiveConstPtr<TScheme>) noexcept = 0;
+ virtual TInitialState Prepare(IDriver*, TIntrusiveConstPtr<TScheme>) noexcept = 0;
virtual EScan Seek(TLead&, ui64 seq) noexcept = 0;
virtual EScan Feed(TArrayRef<const TCell>, const TRow&) noexcept = 0;
virtual TAutoPtr<IDestructable> Finish(EAbort) noexcept = 0;
diff --git a/ydb/core/tablet_flat/flat_stat_part.h b/ydb/core/tablet_flat/flat_stat_part.h
index 230f94f04c..6c01b3be57 100644
--- a/ydb/core/tablet_flat/flat_stat_part.h
+++ b/ydb/core/tablet_flat/flat_stat_part.h
@@ -97,7 +97,7 @@ private:
// This shouldn't be a problem for big parts with many pages
class TPartIndexIterator {
public:
- TPartIndexIterator(TIntrusiveConstPtr<TPart> part, TIntrusiveConstPtr<TKeyNulls> keys)
+ TPartIndexIterator(TIntrusiveConstPtr<TPart> part, TIntrusiveConstPtr<TKeyCellDefaults> keys)
: Part(std::move(part))
, KeyColumns(std::move(keys))
{
@@ -197,7 +197,7 @@ private:
private:
TIntrusiveConstPtr<TPart> Part;
- TIntrusiveConstPtr<TKeyNulls> KeyColumns;
+ TIntrusiveConstPtr<TKeyCellDefaults> KeyColumns;
NPage::TIndex::TIter Pos;
NPage::TIndex::TIter End;
TSmallVec<TCell> CurrentKey;
@@ -212,7 +212,7 @@ private:
// if page start key is not screened then the whole previous page is added to stats
class TScreenedPartIndexIterator {
public:
- TScreenedPartIndexIterator(TPartView partView, TIntrusiveConstPtr<TKeyNulls> keyColumns,
+ TScreenedPartIndexIterator(TPartView partView, TIntrusiveConstPtr<TKeyCellDefaults> keyColumns,
TIntrusiveConstPtr<NPage::TFrames> small)
: PartIter(partView.Part, keyColumns)
, Screen(std::move(partView.Screen))
diff --git a/ydb/core/tablet_flat/flat_stat_table.h b/ydb/core/tablet_flat/flat_stat_table.h
index 8a892b8a67..ce4cb40892 100644
--- a/ydb/core/tablet_flat/flat_stat_table.h
+++ b/ydb/core/tablet_flat/flat_stat_table.h
@@ -13,7 +13,7 @@ namespace NTable {
// Iterates over all parts and maintains total row count and data size
class TStatsIterator {
public:
- explicit TStatsIterator(TIntrusiveConstPtr<TKeyNulls> keyColumns)
+ explicit TStatsIterator(TIntrusiveConstPtr<TKeyCellDefaults> keyColumns)
: KeyColumns(keyColumns)
, Heap(TIterKeyGreater{ this })
{}
@@ -102,7 +102,7 @@ private:
return it->IsValid();
}
- TIntrusiveConstPtr<TKeyNulls> KeyColumns;
+ TIntrusiveConstPtr<TKeyCellDefaults> KeyColumns;
THolderVector<TScreenedPartIndexIterator> Iterators;
TPriorityQueue<TScreenedPartIndexIterator*, TSmallVec<TScreenedPartIndexIterator*>, TIterKeyGreater> Heap;
TSerializedCellVec CurrentKey;
diff --git a/ydb/core/tablet_flat/flat_table_part.cpp b/ydb/core/tablet_flat/flat_table_part.cpp
index 235229cc35..0e55e1b42e 100644
--- a/ydb/core/tablet_flat/flat_table_part.cpp
+++ b/ydb/core/tablet_flat/flat_table_part.cpp
@@ -34,7 +34,7 @@ TIntrusiveConstPtr<TPartScheme> TPartScheme::Parse(TArrayRef<const char> raw, bo
if (labeled) {
/* New styled scheme blob prepended with generic TLabel data */
- auto got = NPage::THello().Read(raw, NPage::EPage::Schem2);
+ auto got = NPage::TLabelWrapper().Read(raw, NPage::EPage::Schem2);
// Version 1 may have non-zero group columns
Y_VERIFY(got.Version == 0 || got.Version == 1, "Unknown EPage::Schem2 version");
@@ -102,7 +102,7 @@ void TPartScheme::FillHistoricSlots()
types.emplace_back(NScheme::NTypeIds::Uint64, NScheme::EOrder::Descending);
TStackVec<TCell, 3> defs;
defs.resize(3);
- HistoryKeys = TKeyNulls::Make(types, defs);
+ HistoryKeys = TKeyCellDefaults::Make(types, defs);
// Synthetic (rowid, step, txid) key for the lead group of historic data
// Note that Tag/Pos are left unspecified, they should never be used
@@ -202,7 +202,7 @@ TSharedData TPartScheme::Serialize() const
TStringStream ss;
proto.SerializeToArcadiaStream(&ss);
- return NPage::THello::Wrap(ss.Str(), EPage::Schem2, Groups.size() > 1 ? 1 : 0);
+ return NPage::TLabelWrapper::Wrap(ss.Str(), EPage::Schem2, Groups.size() > 1 ? 1 : 0);
}
}}
diff --git a/ydb/core/tablet_flat/flat_table_part.h b/ydb/core/tablet_flat/flat_table_part.h
index aa555c515b..2d8b407cc4 100644
--- a/ydb/core/tablet_flat/flat_table_part.h
+++ b/ydb/core/tablet_flat/flat_table_part.h
@@ -46,7 +46,7 @@ namespace NTable {
Trace = 2, /* how many last data pages to keep while seq scans */
};
- struct TEgg {
+ struct TParams {
TEpoch Epoch;
TIntrusiveConstPtr<TPartScheme> Scheme;
TSharedData Index;
@@ -71,28 +71,28 @@ namespace NTable {
ui64 HiddenDrops; /* Hidden (non-main) rows with ERowOp::Erase */
};
- TPart(const TLogoBlobID &label, TEgg egg, TStat stat)
+ TPart(const TLogoBlobID &label, TParams params, TStat stat)
: Label(label)
- , Epoch(egg.Epoch)
- , Scheme(std::move(egg.Scheme))
- , Blobs(std::move(egg.Blobs))
- , Large(std::move(egg.Large))
- , Small(std::move(egg.Small))
- , Index(std::move(egg.Index))
+ , Epoch(params.Epoch)
+ , Scheme(std::move(params.Scheme))
+ , Blobs(std::move(params.Blobs))
+ , Large(std::move(params.Large))
+ , Small(std::move(params.Small))
+ , Index(std::move(params.Index))
, GroupIndexes(
- std::make_move_iterator(egg.GroupIndexes.begin()),
- std::make_move_iterator(egg.GroupIndexes.end()))
+ std::make_move_iterator(params.GroupIndexes.begin()),
+ std::make_move_iterator(params.GroupIndexes.end()))
, HistoricIndexes(
- std::make_move_iterator(egg.HistoricIndexes.begin()),
- std::make_move_iterator(egg.HistoricIndexes.end()))
- , ByKey(std::move(egg.ByKey))
- , GarbageStats(std::move(egg.GarbageStats))
- , TxIdStats(std::move(egg.TxIdStats))
+ std::make_move_iterator(params.HistoricIndexes.begin()),
+ std::make_move_iterator(params.HistoricIndexes.end()))
+ , ByKey(std::move(params.ByKey))
+ , GarbageStats(std::move(params.GarbageStats))
+ , TxIdStats(std::move(params.TxIdStats))
, Stat(stat)
, Groups(1 + GroupIndexes.size())
, IndexesRawSize(Index.RawSize() + SumRawSize(GroupIndexes))
- , MinRowVersion(egg.MinRowVersion)
- , MaxRowVersion(egg.MaxRowVersion)
+ , MinRowVersion(params.MinRowVersion)
+ , MaxRowVersion(params.MaxRowVersion)
{
Y_VERIFY(Scheme->Groups.size() == Groups,
"Part has scheme with %" PRISZT " groups, but %" PRISZT " indexes",
diff --git a/ydb/core/tablet_flat/test/libs/table/test_comp.h b/ydb/core/tablet_flat/test/libs/table/test_comp.h
index d6095c2a78..1f6d83b29f 100644
--- a/ydb/core/tablet_flat/test/libs/table/test_comp.h
+++ b/ydb/core/tablet_flat/test/libs/table/test_comp.h
@@ -124,7 +124,7 @@ namespace NTest {
}
private:
- virtual THello Prepare(IDriver*, TIntrusiveConstPtr<TScheme>) noexcept override
+ virtual TInitialState Prepare(IDriver*, TIntrusiveConstPtr<TScheme>) noexcept override
{
Y_FAIL("IScan::Prepare(...) isn't used in test env compaction");
}
diff --git a/ydb/core/tablet_flat/test/libs/table/test_part.h b/ydb/core/tablet_flat/test/libs/table/test_part.h
index e1dde28eea..eb8842ed64 100644
--- a/ydb/core/tablet_flat/test/libs/table/test_part.h
+++ b/ydb/core/tablet_flat/test/libs/table/test_part.h
@@ -27,9 +27,9 @@ namespace NTest {
{ }
public:
- TPartStore(TIntrusiveConstPtr<TStore> store, TLogoBlobID label, TEgg egg, TStat stat,
+ TPartStore(TIntrusiveConstPtr<TStore> store, TLogoBlobID label, TPart::TParams params, TStat stat,
TIntrusiveConstPtr<TSlices> slices)
- : TPart(label, egg, stat)
+ : TPart(label, params, stat)
, Store(std::move(store))
, Slices(std::move(slices))
{
diff --git a/ydb/core/tablet_flat/test/libs/table/test_store.h b/ydb/core/tablet_flat/test/libs/table/test_store.h
index bdd506663a..0ea1c7192b 100644
--- a/ydb/core/tablet_flat/test/libs/table/test_store.h
+++ b/ydb/core/tablet_flat/test/libs/table/test_store.h
@@ -142,7 +142,7 @@ namespace NTest {
const auto& pages = PageCollections.at(MainPageCollection);
for (auto it: xrange(pages.size())) {
- auto got = NPage::THello().Read(pages[it], EPage::Undef);
+ auto got = NPage::TLabelWrapper().Read(pages[it], EPage::Undef);
Y_VERIFY(got.Page.end() == pages[it].end());
diff --git a/ydb/core/tablet_flat/test/libs/table/wrap_iter.h b/ydb/core/tablet_flat/test/libs/table/wrap_iter.h
index 9cd855141f..228890542a 100644
--- a/ydb/core/tablet_flat/test/libs/table/wrap_iter.h
+++ b/ydb/core/tablet_flat/test/libs/table/wrap_iter.h
@@ -100,7 +100,7 @@ namespace NTest {
public:
const TIntrusiveConstPtr<TRowScheme> Scheme;
- const TIntrusiveConstPtr<TKeyNulls> Nulls;
+ const TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
const TFrozen Frozen;
const TFlatten Flatten;
const TRowVersion Snapshot;
diff --git a/ydb/core/tablet_flat/test/tool/perf/do_mem.h b/ydb/core/tablet_flat/test/tool/perf/do_mem.h
index 1a83c4f762..833f1a9902 100644
--- a/ydb/core/tablet_flat/test/tool/perf/do_mem.h
+++ b/ydb/core/tablet_flat/test/tool/perf/do_mem.h
@@ -70,7 +70,7 @@ namespace NPerf {
private:
TIntrusivePtr<TMemTable> Table;
- TIntrusiveConstPtr<TKeyNulls> Nulls;
+ TIntrusiveConstPtr<TKeyCellDefaults> Nulls;
TRemap Remap;
TAutoPtr<TMemIt> Iter;
TRowState State;
diff --git a/ydb/core/tablet_flat/test/tool/perf/do_part.h b/ydb/core/tablet_flat/test/tool/perf/do_part.h
index 5c33c63964..c642a75131 100644
--- a/ydb/core/tablet_flat/test/tool/perf/do_part.h
+++ b/ydb/core/tablet_flat/test/tool/perf/do_part.h
@@ -61,7 +61,7 @@ namespace NPerf {
TStats stats;
for (auto &page: part.Store->PageCollectionArray(0 /* main room */)) {
- auto got = NPage::THello().Read(page, EPage::Undef);
+ auto got = NPage::TLabelWrapper().Read(page, EPage::Undef);
if (got == NPage::EPage::DataPage) {
stats.Bytes += page.size();
diff --git a/ydb/core/tablet_flat/ut/flat_comp_ut_common.h b/ydb/core/tablet_flat/ut/flat_comp_ut_common.h
index 0f6e025d72..cec48721e7 100644
--- a/ydb/core/tablet_flat/ut/flat_comp_ut_common.h
+++ b/ydb/core/tablet_flat/ut/flat_comp_ut_common.h
@@ -262,7 +262,7 @@ public:
, Step(step)
{ }
- TString ToString(const TKeyNulls& nulls, bool dumpStep) const {
+ TString ToString(const TKeyCellDefaults& nulls, bool dumpStep) const {
TStringStream s;
Describe(s, nulls);
s << "@" << Epoch;
@@ -273,7 +273,7 @@ public:
}
};
- const TKeyNulls& nulls = *DB.GetRowScheme(table)->Keys;
+ const TKeyCellDefaults& nulls = *DB.GetRowScheme(table)->Keys;
auto keyRangeLess = [&nulls](const TKeyRange& a, const TKeyRange& b) -> bool {
if (auto cmp = ComparePartKeys(a.FirstKey.GetCells(), b.FirstKey.GetCells(), nulls)) {
return cmp < 0;
diff --git a/ydb/core/tablet_flat/ut/ut_pages.cpp b/ydb/core/tablet_flat/ut/ut_pages.cpp
index b9e417861a..abe9e71905 100644
--- a/ydb/core/tablet_flat/ut/ut_pages.cpp
+++ b/ydb/core/tablet_flat/ut/ut_pages.cpp
@@ -51,7 +51,7 @@ Y_UNIT_TEST_SUITE(NPage) {
for (auto page: xrange(part.Store->PageCollectionPagesCount(0))) {
auto *raw = part.Store->GetPage(0, page);
- auto got = NPage::THello().Read(*raw, NPage::EPage::Undef);
+ auto got = NPage::TLabelWrapper().Read(*raw, NPage::EPage::Undef);
if (got.Type != NPage::EPage::DataPage) {
/* Have to check for compression only rows page */
diff --git a/ydb/core/tablet_flat/ut/ut_slice_loader.cpp b/ydb/core/tablet_flat/ut/ut_slice_loader.cpp
index 822319b533..a2516d8947 100644
--- a/ydb/core/tablet_flat/ut/ut_slice_loader.cpp
+++ b/ydb/core/tablet_flat/ut/ut_slice_loader.cpp
@@ -107,7 +107,7 @@ namespace {
TIntrusivePtr<TSlices> Run;
};
- void VerifyRunOrder(TIntrusiveConstPtr<TSlices> run, const TKeyNulls& keys)
+ void VerifyRunOrder(TIntrusiveConstPtr<TSlices> run, const TKeyCellDefaults& keys)
{
const TSlice* prev = nullptr;
for (auto& slice : *run) {
diff --git a/ydb/core/tx/datashard/datashard__build_index.cpp b/ydb/core/tx/datashard/datashard__build_index.cpp
index 5aebf94dc5..dbf29287a1 100644
--- a/ydb/core/tx/datashard/datashard__build_index.cpp
+++ b/ydb/core/tx/datashard/datashard__build_index.cpp
@@ -254,7 +254,7 @@ public:
~TBuildIndexScan() override = default;
- THello Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme>) noexcept override {
+ TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme>) noexcept override {
auto selfActorId = TActivationContext::AsActorContext().RegisterWithSameMailbox(this);
auto ctx = TActivationContext::AsActorContext().MakeFor(selfActorId);
diff --git a/ydb/core/tx/datashard/datashard__conditional_erase_rows.cpp b/ydb/core/tx/datashard/datashard__conditional_erase_rows.cpp
index 026b14e461..9f2ef822ee 100644
--- a/ydb/core/tx/datashard/datashard__conditional_erase_rows.cpp
+++ b/ydb/core/tx/datashard/datashard__conditional_erase_rows.cpp
@@ -235,7 +235,7 @@ public:
<< " }";
}
- IScan::THello Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
+ IScan::TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
TlsActivationContext->AsActorContext().RegisterWithSameMailbox(this);
Driver = driver;
diff --git a/ydb/core/tx/datashard/datashard__kqp_scan.cpp b/ydb/core/tx/datashard/datashard__kqp_scan.cpp
index 182e9882c0..7097ebbc8e 100644
--- a/ydb/core/tx/datashard/datashard__kqp_scan.cpp
+++ b/ydb/core/tx/datashard/datashard__kqp_scan.cpp
@@ -180,7 +180,7 @@ private:
}
private:
- THello Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept final {
+ TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept final {
Y_VERIFY(scheme);
Y_VERIFY(driver);
@@ -193,7 +193,7 @@ private:
Sleep = true;
- THello startConfig;
+ TInitialState startConfig;
startConfig.Scan = EScan::Sleep;
startConfig.Conf.ReadAheadLo = READAHEAD_LO;
startConfig.Conf.ReadAheadHi = READAHEAD_HI;
diff --git a/ydb/core/tx/datashard/datashard__read_columns.cpp b/ydb/core/tx/datashard/datashard__read_columns.cpp
index 2b56a192d1..6b7200f552 100644
--- a/ydb/core/tx/datashard/datashard__read_columns.cpp
+++ b/ydb/core/tx/datashard/datashard__read_columns.cpp
@@ -86,11 +86,11 @@ public:
, BlockBuilder(std::move(blockBuilder))
{}
- THello Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
+ TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
Driver = driver;
Scheme = std::move(scheme);
- THello hello;
+ TInitialState hello;
hello.Scan = EScan::Reset;
return hello;
}
diff --git a/ydb/core/tx/datashard/export_scan.cpp b/ydb/core/tx/datashard/export_scan.cpp
index 2cda75fdd0..b0c40aec22 100644
--- a/ydb/core/tx/datashard/export_scan.cpp
+++ b/ydb/core/tx/datashard/export_scan.cpp
@@ -169,7 +169,7 @@ public:
<< " }";
}
- IScan::THello Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
+ IScan::TInitialState Prepare(IDriver* driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override {
TlsActivationContext->AsActorContext().RegisterWithSameMailbox(this);
Driver = driver;
diff --git a/ydb/core/tx/datashard/read_table_scan.cpp b/ydb/core/tx/datashard/read_table_scan.cpp
index 63e94fde96..561484576d 100644
--- a/ydb/core/tx/datashard/read_table_scan.cpp
+++ b/ydb/core/tx/datashard/read_table_scan.cpp
@@ -427,7 +427,7 @@ private:
IEventHandle::FlagTrackDelivery | IEventHandle::FlagSubscribeOnSession);
}
- THello Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
+ TInitialState Prepare(IDriver *driver, TIntrusiveConstPtr<TScheme> scheme) noexcept override
{
Driver = driver;