File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -955,16 +955,16 @@ Y_UNIT_TEST_SUITE(TPart) {
955
955
auto slices = MakeIntrusive<TSlices>();
956
956
for (size_t rowId = 0 ; rowId < fullRows.size ();) {
957
957
TSlice slice;
958
- slice.FirstInclusive = true ;
959
958
slice.FirstRowId = rowId;
960
- if (rowId > 0 )
961
- slice.FirstKey = getKey (IndexTools::GetRecord (*cutPartTmp, slice.FirstRowId ));
962
- slice.LastInclusive = false ;
963
- slice.LastRowId = rowId + RandomNumber<ui32>(2 ) + 1 ;
964
- if (slice.LastRowId < fullRows.size ())
965
- slice.LastKey = getKey (IndexTools::GetRecord (*cutPartTmp, slice.LastRowId ));
959
+ slice.FirstInclusive = true ;
960
+ slice.FirstKey = getKey (IndexTools::GetRecord (*cutPartTmp, slice.FirstRowId ));
961
+ slice.LastRowId = Min (fullRows.size (), rowId + RandomNumber<ui32>(2 ) + 1 );
962
+ slice.LastInclusive = slice.LastRowId == fullRows.size ();
963
+ slice.LastKey = getKey (slice.LastRowId < fullRows.size ()
964
+ ? IndexTools::GetRecord (*cutPartTmp, slice.LastRowId )
965
+ : IndexTools::GetLastRecord (*cutPartTmp));
966
966
slices->push_back (slice);
967
- rowId = slice.LastRowId ;
967
+ rowId = slice.EndRowId () ;
968
968
}
969
969
970
970
Cerr << " ======= SLICES =======" << Endl;
You can’t perform that action at this time.
0 commit comments