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/04/01 09:59:45 UTC

[GitHub] [incubator-doris] zenoyang commented on a change in pull request #8800: [Bug][Vectorized] Fix core bug of segment vectorized

zenoyang commented on a change in pull request #8800:
URL: https://github.com/apache/incubator-doris/pull/8800#discussion_r840427446



##########
File path: be/src/vec/core/block.h
##########
@@ -104,6 +104,16 @@ class Block {
                                      doris::vectorized::IColumn* input_col_ptr,
                                      uint16_t* sel_rowid_idx, uint16_t select_size, int block_cid,
                                      size_t batch_size) {
+        // Only the additional deleted filter condition need to materialize column be at the end of the block
+        // We should not to materialize the column of query engine do not need. So here just return OK.
+        // Eg:
+        //      `delete from table where a = 10;`
+        //      `select b from table;`
+        // a column only effective in segment iterator, the block from query engine only contain the b column.
+        // so the `block_cid >= data.size()` is true
+        if (block_cid >= data.size())

Review comment:
       After `_output_column_by_sel_idx` is executed, `Block::shrink_char_type_column_suffix_zero` may be executed, so it may be necessary to judge, for example
   
   ```cpp
   void Block::shrink_char_type_column_suffix_zero(std::vector<size_t> char_type_idx) {
       for (auto idx : char_type_idx) {
           if (idx >= data.size()) {
               continue;
           }
           // ...
       }
   }
   ```




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