zhannngchen commented on code in PR #22782: URL: https://github.com/apache/doris/pull/22782#discussion_r1292939180
########## be/src/olap/rowset/segment_v2/segment_writer.cpp: ########## @@ -388,10 +391,17 @@ Status SegmentWriter::append_block_with_partial_content(const vectorized::Block* // locate rows in base data int64_t num_rows_filtered = 0; - for (size_t pos = row_pos; pos < row_pos + num_rows; pos++) { - std::string key = _full_encode_keys(key_columns, pos); + for (size_t block_pos = row_pos; block_pos < row_pos + num_rows; block_pos++) { + // block segment + // 2 -> 0 + // 3 -> 1 + // 4 -> 2 + // 5 -> 3 + // here row_pos = 2, num_rows = 4. + size_t delta_pos = block_pos - row_pos; + std::string key = _full_encode_keys(key_columns, block_pos); Review Comment: should use `delta_pos`? -- 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