dataroaring commented on code in PR #13359:
URL: https://github.com/apache/doris/pull/13359#discussion_r1009220294


##########
be/src/olap/rowset/segment_v2/segment_writer.h:
##########
@@ -120,11 +130,16 @@ class SegmentWriter {
     std::unique_ptr<MemTracker> _mem_tracker;
     uint32_t _row_count = 0;
 
-    vectorized::OlapBlockDataConvertor _olap_data_convertor;
+    std::unique_ptr<vectorized::OlapBlockDataConvertor> _olap_data_convertor;
     // used for building short key index or primary key index during 
vectorized write.
     std::vector<const KeyCoder*> _key_coders;
     std::vector<uint16_t> _key_index_size;
     size_t _short_key_row_pos = 0;
+
+    std::vector<uint32_t> _column_ids;
+    bool _has_key = true;
+    // written when add particial columns
+    uint32_t _num_rows_written = 0;

Review Comment:
   The variable _num_rows_written is confused. It seems that num_rows_written 
works if users used segment writer in the order write keys, flush keys, writer 
colums? We should add more comment here.
   
   // used to count rows to SegmentWriter, in vertical compaction, 
num_rows_written = actual_row_count * column groups number.  or we can find a 
better name.



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