Skip to content

Commit be651b5

Browse files
author
ivanmorozov333
committed
fix
1 parent def0c74 commit be651b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/library/formats/arrow/splitter/stats.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ TSimpleSerializationStat::TSimpleSerializationStat(const ui64 bytes, const ui64
3434

3535
std::vector<i64> TSimpleSerializationStat::SplitRecords(
3636
const ui32 recordsCount, const ui32 expectedRecordsCount, const ui32 expectedColumnPageSize) {
37-
if (!SerializedBytes) {
37+
if (!SerializedBytes || !RecordsCount) {
3838
return TSimilarPacker::SplitWithExpected(recordsCount, expectedRecordsCount);
3939
} else {
40-
const ui32 recordsCountPerExpectedPageSize = std::max<ui32>(expectedRecordsCount, expectedColumnPageSize / SerializedBytes);
40+
const ui32 recordsCountPerExpectedPageSize = std::max<ui32>(expectedRecordsCount, expectedColumnPageSize / GetSerializedBytesPerRecord());
4141
return TSimilarPacker::SplitWithExpected(recordsCount, recordsCountPerExpectedPageSize);
4242
}
4343
}

0 commit comments

Comments
 (0)