BiteTheDDDDt commented on code in PR #9157: URL: https://github.com/apache/incubator-doris/pull/9157#discussion_r857550283
########## be/src/olap/rowset/segment_v2/segment_writer.cpp: ########## @@ -156,6 +157,14 @@ Status SegmentWriter::append_block(const vectorized::Block* block, size_t row_po return Status::OK(); } +int64_t SegmentWriter::max_row_to_add(size_t row_avg_size_in_bytes) { + int64_t size_rows = ((int64_t)MAX_SEGMENT_SIZE - (int64_t)estimate_segment_size()) / row_avg_size_in_bytes; + int64_t count_rows = (int64_t)_max_row_per_segment - _row_count ; Review Comment: ```suggestion int64_t count_rows = (int64_t)_max_row_per_segment - _row_count; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org