github-actions[bot] commented on code in PR #28084:
URL: https://github.com/apache/doris/pull/28084#discussion_r1417284116


##########
be/src/olap/rowset/segment_creator.cpp:
##########
@@ -59,31 +59,29 @@ Status SegmentFlusher::flush_single_block(const 
vectorized::Block* block, int32_
     if (block->rows() == 0) {
         return Status::OK();
     }
-    TabletSchemaSPtr flush_schema = nullptr;
     // Expand variant columns
     vectorized::Block flush_block(*block);
     if (_context->write_type != DataWriteType::TYPE_COMPACTION &&
         _context->tablet_schema->num_variant_columns() > 0) {
-        RETURN_IF_ERROR(_expand_variant_to_subcolumns(flush_block, 
flush_schema));
+        RETURN_IF_ERROR(_expand_variant_to_subcolumns(flush_block));
     }
     bool no_compression = flush_block.bytes() <= 
config::segment_compression_threshold_kb * 1024;
     if (config::enable_vertical_segment_writer &&
         _context->tablet_schema->cluster_key_idxes().empty()) {
         std::unique_ptr<segment_v2::VerticalSegmentWriter> writer;
-        RETURN_IF_ERROR(_create_segment_writer(writer, segment_id, 
no_compression, flush_schema));
+        RETURN_IF_ERROR(_create_segment_writer(writer, segment_id, 
no_compression, _flush_schema));
         RETURN_IF_ERROR(_add_rows(writer, &flush_block, 0, 
flush_block.rows()));
         RETURN_IF_ERROR(_flush_segment_writer(writer, flush_size));
     } else {
         std::unique_ptr<segment_v2::SegmentWriter> writer;
-        RETURN_IF_ERROR(_create_segment_writer(writer, segment_id, 
no_compression, flush_schema));
+        RETURN_IF_ERROR(_create_segment_writer(writer, segment_id, 
no_compression, _flush_schema));
         RETURN_IF_ERROR(_add_rows(writer, &flush_block, 0, 
flush_block.rows()));
         RETURN_IF_ERROR(_flush_segment_writer(writer, flush_size));
     }
     return Status::OK();
 }
 
-Status SegmentFlusher::_expand_variant_to_subcolumns(vectorized::Block& block,
-                                                     TabletSchemaSPtr& 
flush_schema) {
+Status SegmentFlusher::_expand_variant_to_subcolumns(vectorized::Block& block) 
{

Review Comment:
   warning: function '_expand_variant_to_subcolumns' exceeds recommended 
size/complexity thresholds [readability-function-size]
   ```cpp
   Status SegmentFlusher::_expand_variant_to_subcolumns(vectorized::Block& 
block) {
                          ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/olap/rowset/segment_creator.cpp:83:** 127 lines including 
whitespace and comments (threshold 80)
   ```cpp
   Status SegmentFlusher::_expand_variant_to_subcolumns(vectorized::Block& 
block) {
                          ^
   ```
   
   </details>
   



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