yixiutt commented on code in PR #9569:
URL: https://github.com/apache/incubator-doris/pull/9569#discussion_r873143999


##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -98,29 +98,34 @@ Status BetaRowsetWriter::init(const RowsetWriterContext& 
rowset_writer_context)
 }
 
 Status BetaRowsetWriter::add_block(const vectorized::Block* block) {
-    if (block->rows() == 0) {
-        return Status::OK();
-    }
     if (UNLIKELY(_segment_writer == nullptr)) {
         RETURN_NOT_OK(_create_segment_writer(&_segment_writer));
     }
+    return _add_block(block, &_segment_writer);
+}
+
+Status BetaRowsetWriter::_add_block(const vectorized::Block* block,
+                                    
std::unique_ptr<segment_v2::SegmentWriter>* segment_writer) {

Review Comment:
   add block will change segment_writer so i use unique_ptr*



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to