HappenLee commented on code in PR #44425: URL: https://github.com/apache/doris/pull/44425#discussion_r1855720578
########## be/src/vec/columns/column_vector.h: ########## @@ -178,9 +180,11 @@ class ColumnVector final : public COWHelper<IColumn, ColumnVector<T>> { void insert_range_of_integer(T begin, T end) { if constexpr (std::is_integral_v<T>) { auto old_size = data.size(); - data.resize(old_size + (end - begin)); - for (int i = 0; i < end - begin; i++) { - data[old_size + i] = begin + i; + // (end - begin) is the number of elements added to the vector, Review Comment: better use `std::iota` -- 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