1
1
#pragma once
2
2
3
3
#include " flat_part_iface.h"
4
- #include " flat_page_index.h"
5
4
#include " flat_table_part.h"
6
5
#include " flat_part_index_iter_iface.h"
7
6
@@ -116,7 +115,7 @@ class TPartBtreeIndexIt : public IIndexIter {
116
115
, GroupId(groupId)
117
116
, GroupInfo(part->Scheme->GetLayout (groupId))
118
117
, Meta(groupId.IsHistoric() ? part->IndexPages.BTreeHistoric[groupId.Index] : part->IndexPages.BTreeGroups[groupId.Index])
119
- , State(Reserve(Meta.LevelsCount + 1 ))
118
+ , State(Reserve(Meta.LevelCount + 1 ))
120
119
{
121
120
const static TCellsIterable EmptyKey (static_cast <const char *>(nullptr ), TColumns ());
122
121
State.emplace_back (Meta, 0 , GetEndRowId (), EmptyKey, EmptyKey);
@@ -181,7 +180,7 @@ class TPartBtreeIndexIt : public IIndexIter {
181
180
EReady Next () override {
182
181
Y_ABORT_UNLESS (!IsExhausted ());
183
182
184
- if (Meta.LevelsCount == 0 ) {
183
+ if (Meta.LevelCount == 0 ) {
185
184
return Exhaust ();
186
185
}
187
186
@@ -195,7 +194,7 @@ class TPartBtreeIndexIt : public IIndexIter {
195
194
PushNextState (*State.back ().Pos + 1 );
196
195
}
197
196
198
- for (size_t level : xrange (State.size () - 1 , Meta.LevelsCount )) {
197
+ for (ui32 level : xrange<ui32> (State.size () - 1 , Meta.LevelCount )) {
199
198
if (!TryLoad (State[level])) {
200
199
// exiting with an intermediate state
201
200
Y_DEBUG_ABORT_UNLESS (!IsLeaf () && !IsExhausted ());
@@ -212,7 +211,7 @@ class TPartBtreeIndexIt : public IIndexIter {
212
211
EReady Prev () override {
213
212
Y_ABORT_UNLESS (!IsExhausted ());
214
213
215
- if (Meta.LevelsCount == 0 ) {
214
+ if (Meta.LevelCount == 0 ) {
216
215
return Exhaust ();
217
216
}
218
217
@@ -226,7 +225,7 @@ class TPartBtreeIndexIt : public IIndexIter {
226
225
PushNextState (*State.back ().Pos - 1 );
227
226
}
228
227
229
- for (size_t level : xrange (State.size () - 1 , Meta.LevelsCount )) {
228
+ for (ui32 level : xrange<ui32> (State.size () - 1 , Meta.LevelCount )) {
230
229
if (!TryLoad (State[level])) {
231
230
// exiting with an intermediate state
232
231
Y_DEBUG_ABORT_UNLESS (!IsLeaf () && !IsExhausted ());
@@ -247,7 +246,7 @@ class TPartBtreeIndexIt : public IIndexIter {
247
246
}
248
247
249
248
TRowId GetEndRowId () const override {
250
- return Meta.Count ;
249
+ return Meta.RowCount ;
251
250
}
252
251
253
252
TPageId GetPageId () const override {
@@ -287,7 +286,7 @@ class TPartBtreeIndexIt : public IIndexIter {
287
286
State[0 ].Pos = { };
288
287
}
289
288
290
- for (size_t level : xrange (State.size () - 1 , Meta.LevelsCount )) {
289
+ for (ui32 level : xrange<ui32> (State.size () - 1 , Meta.LevelCount )) {
291
290
auto &state = State[level];
292
291
Y_DEBUG_ABORT_UNLESS (seek.BelongsTo (state));
293
292
if (!TryLoad (state)) {
@@ -317,7 +316,7 @@ class TPartBtreeIndexIt : public IIndexIter {
317
316
bool IsLeaf () const noexcept {
318
317
// Note: it is possible to have 0 levels in B-Tree
319
318
// so we may have exhausted state with leaf (data) node
320
- return State.size () == Meta.LevelsCount + 1 && !IsExhausted ();
319
+ return State.size () == Meta.LevelCount + 1 && !IsExhausted ();
321
320
}
322
321
323
322
EReady Exhaust () {
@@ -335,8 +334,8 @@ class TPartBtreeIndexIt : public IIndexIter {
335
334
336
335
auto child = current.Node ->GetChild (pos);
337
336
338
- TRowId beginRowId = pos ? current.Node ->GetChild (pos - 1 ).Count : current.BeginRowId ;
339
- TRowId endRowId = child.Count ;
337
+ TRowId beginRowId = pos ? current.Node ->GetChild (pos - 1 ).RowCount : current.BeginRowId ;
338
+ TRowId endRowId = child.RowCount ;
340
339
341
340
TCellsIterable beginKey = pos ? current.Node ->GetKeyCellsIterable (pos - 1 , GroupInfo.ColsKeyIdx ) : current.BeginKey ;
342
341
TCellsIterable endKey = pos < current.Node ->GetKeysCount () ? current.Node ->GetKeyCellsIterable (pos, GroupInfo.ColsKeyIdx ) : current.EndKey ;
0 commit comments