You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/23 06:47:33 UTC

[GitHub] [incubator-doris] cambyzju commented on a diff in pull request #9734: [Bug] [Vectorized] add padding when load char type data

cambyzju commented on code in PR #9734:
URL: https://github.com/apache/incubator-doris/pull/9734#discussion_r879076822


##########
be/src/vec/olap/olap_data_convertor.cpp:
##########
@@ -372,6 +372,21 @@ Status OlapBlockDataConvertor::OlapColumnDataConvertorChar::convert_to_olap() {
 
     assert(column_string);
 
+    size_t rows = column_string->size();
+    if (column_string->chars_size() != _length * rows) {
+        _column = vectorized::ColumnString::create();
+        auto padded_column =
+                assert_cast<vectorized::ColumnString*>(_column->assume_mutable().get());
+        padded_column->resize(rows);

Review Comment:
   ```suggestion
           padded_column->reserve(rows);
   ```



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org