xinyiZzz commented on code in PR #44425:
URL: https://github.com/apache/doris/pull/44425#discussion_r1855786098


##########
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:
   done



##########
be/src/vec/columns/column_string.cpp:
##########
@@ -434,8 +448,11 @@ template <typename T>
 void ColumnStr<T>::serialize_vec(std::vector<StringRef>& keys, size_t num_rows,
                                  size_t max_row_byte_size) const {
     for (size_t i = 0; i < num_rows; ++i) {
-        uint32_t offset(offset_at(i));
-        uint32_t string_size(size_at(i));
+        // https://github.com/apache/doris/pull/10832

Review Comment:
   done



##########
be/src/vec/columns/column_string.cpp:
##########
@@ -391,8 +402,11 @@ ColumnPtr ColumnStr<T>::permute(const 
IColumn::Permutation& perm, size_t limit)
 template <typename T>
 StringRef ColumnStr<T>::serialize_value_into_arena(size_t n, Arena& arena,
                                                    char const*& begin) const {
-    uint32_t string_size(size_at(n));
-    uint32_t offset(offset_at(n));
+    // https://github.com/apache/doris/pull/10832
+    // Use uint32 instead of size_t to reduce agg key's length.
+    // Size of a line will not exceed 4G, check the size when inserting data 
into ColumnStr<T>.
+    auto string_size(cast_set<uint32_t>(size_at(n)));

Review Comment:
   done



-- 
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

Reply via email to