eldenmoon commented on code in PR #28084:
URL: https://github.com/apache/doris/pull/28084#discussion_r1418334547
##########
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));
Review Comment:
done
##########
be/src/olap/rowset/segment_creator.cpp:
##########
@@ -344,7 +342,7 @@ Status SegmentFlusher::_flush_segment_writer(
writer.reset();
- RETURN_IF_ERROR(_context->segment_collector->add(segment_id, segstat));
+ RETURN_IF_ERROR(_context->segment_collector->add(segment_id, segstat,
_flush_schema));
Review Comment:
done
##########
be/src/olap/rowset/segment_creator.cpp:
##########
@@ -386,7 +384,7 @@ Status
SegmentFlusher::_flush_segment_writer(std::unique_ptr<segment_v2::Segment
writer.reset();
- RETURN_IF_ERROR(_context->segment_collector->add(segment_id, segstat));
+ RETURN_IF_ERROR(_context->segment_collector->add(segment_id, segstat,
_flush_schema));
Review Comment:
done
--
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]