Skip to content

Commit d3a177b

Browse files
committed
cr: fix HasKeyCells name
1 parent 94ce373 commit d3a177b

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

ydb/core/tablet_flat/flat_part_btree_index_iter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class TPartBtreeIndexIt : public IIndexIter {
264264
return State.back().EndRowId;
265265
}
266266

267-
TPos HasKeyCells() const override {
267+
TPos GetKeyCellsCount() const override {
268268
Y_ABORT_UNLESS(IsLeaf());
269269
return State.back().BeginKey.Count();
270270
}

ydb/core/tablet_flat/flat_part_index_iter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class TPartIndexIt : public IIndexIter, public IStatsPartGroupIterator {
128128
: EndRowId;
129129
}
130130

131-
TPos HasKeyCells() const override {
131+
TPos GetKeyCellsCount() const override {
132132
Y_ABORT_UNLESS(Index);
133133
Y_ABORT_UNLESS(Iter);
134134
return GroupInfo.KeyTypes.size();

ydb/core/tablet_flat/flat_part_index_iter_iface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace NKikimr::NTable {
2222
virtual TRowId GetRowId() const = 0;
2323
virtual TRowId GetNextRowId() const = 0;
2424

25-
virtual TPos HasKeyCells() const = 0;
25+
virtual TPos GetKeyCellsCount() const = 0;
2626
virtual TCell GetKeyCell(TPos index) const = 0;
2727

2828
virtual ~IIndexIter() = default;

ydb/core/tablet_flat/flat_part_iter_multi.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ namespace NTable {
544544
return Exhausted();
545545
};
546546
case EReady::Data: {
547-
Y_DEBUG_ABORT_UNLESS(Index.HasKeyCells(), "Non-first page is expected to have key cells");
548-
if (Index.HasKeyCells()) {
547+
Y_DEBUG_ABORT_UNLESS(Index.GetKeyCellsCount(), "Non-first page is expected to have key cells");
548+
if (Index.GetKeyCellsCount()) {
549549
if (!checkIndex()) {
550550
// First row for the next RowId
551551
MaxVersion = TRowVersion::Max();
@@ -632,8 +632,8 @@ namespace NTable {
632632
}
633633

634634
// We need exact match on rowId, bail on larger values
635-
Y_DEBUG_ABORT_UNLESS(Index.GetRowId() == 0 || Index.HasKeyCells(), "Non-first page is expected to have key cells");
636-
if (Index.HasKeyCells()) {
635+
Y_DEBUG_ABORT_UNLESS(Index.GetRowId() == 0 || Index.GetKeyCellsCount(), "Non-first page is expected to have key cells");
636+
if (Index.GetKeyCellsCount()) {
637637
TRowId indexRowId = Index.GetKeyCell(0).AsValue<TRowId>();
638638
if (rowId < indexRowId) {
639639
// We cannot compute MaxVersion anyway as indexRowId row may be presented on the previous page
@@ -675,8 +675,8 @@ namespace NTable {
675675
return Terminate(ready);
676676
}
677677

678-
Y_DEBUG_ABORT_UNLESS(Index.HasKeyCells(), "Non-first page is expected to have key cells");
679-
if (Y_LIKELY(Index.HasKeyCells())) {
678+
Y_DEBUG_ABORT_UNLESS(Index.GetKeyCellsCount(), "Non-first page is expected to have key cells");
679+
if (Y_LIKELY(Index.GetKeyCellsCount())) {
680680
if (!checkIndex()) {
681681
// First row for the nextRowId
682682
MaxVersion = TRowVersion::Max();
@@ -706,7 +706,7 @@ namespace NTable {
706706
Data = Page->Begin();
707707
Y_ABORT_UNLESS(Data);
708708

709-
if (Index.HasKeyCells()) {
709+
if (Index.GetKeyCellsCount()) {
710710
// Must have rowId as we have checked index
711711
Y_ABORT_UNLESS(checkData() && RowVersion <= rowVersion, "Index and Data are out of sync");
712712

ydb/core/tablet_flat/flat_stat_part.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ class TStatsScreenedPartIterator {
113113
}
114114

115115
if (HistoricGroups) {
116-
const auto& historyScheme = Part->Scheme->HistoryGroup;
117-
Y_DEBUG_ABORT_UNLESS(historyScheme.ColsKeyIdx.size() == 3);
118-
while (HistoricGroups[0]->IsValid() && (!HistoricGroups[0]->HasKeyCells() || HistoricGroups[0]->GetKeyCell(0).AsValue<TRowId>() < nextRowId)) {
116+
Y_DEBUG_ABORT_UNLESS(Part->Scheme->HistoryGroup.ColsKeyIdx.size() == 3);
117+
while (HistoricGroups[0]->IsValid() && (!HistoricGroups[0]->GetKeyCellsCount() || HistoricGroups[0]->GetKeyCell(0).AsValue<TRowId>() < nextRowId)) {
119118
// eagerly include all history up to the next row id
120119
if (rowCount) {
121120
AddPageSize(stats.DataSize, HistoricGroups[0]->GetPageId(), TGroupId(0, true));
@@ -190,7 +189,7 @@ class TStatsScreenedPartIterator {
190189

191190
ui32 keyIdx = 0;
192191
// Add columns that are present in the part
193-
if (ui32 keyCellsCount = Groups[0]->HasKeyCells()) {
192+
if (ui32 keyCellsCount = Groups[0]->GetKeyCellsCount()) {
194193
for (;keyIdx < keyCellsCount; ++keyIdx) {
195194
CurrentKey.push_back(Groups[0]->GetKeyCell(keyIdx));
196195
}

ydb/core/tablet_flat/flat_stat_part_group_btree_index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class TStatsPartGroupBtreeIndexIterator : public IStatsPartGroupIterator {
132132
return State.back().BeginRowId;
133133
}
134134

135-
TPos HasKeyCells() const override {
135+
TPos GetKeyCellsCount() const override {
136136
Y_ABORT_UNLESS(IsLeaf());
137137
return State.back().BeginKey.Count();
138138
}

ydb/core/tablet_flat/flat_stat_part_group_iter_iface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace NKikimr::NTable {
1515
virtual TPageId GetPageId() const = 0;
1616
virtual TRowId GetRowId() const = 0;
1717

18-
virtual TPos HasKeyCells() const = 0;
18+
virtual TPos GetKeyCellsCount() const = 0;
1919
virtual TCell GetKeyCell(TPos index) const = 0;
2020

2121
virtual ~IStatsPartGroupIterator() = default;

0 commit comments

Comments
 (0)