yixiutt commented on code in PR #16731:
URL: https://github.com/apache/doris/pull/16731#discussion_r1113903328
##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -133,18 +137,21 @@ RowwiseIteratorUPtr
BetaRowsetWriter::_get_segcompaction_reader(
}
seg_iterators.push_back(std::move(iter));
}
- bool is_unique = (_context.tablet_schema->keys_type() == UNIQUE_KEYS);
- bool is_reverse = false;
- auto merge_itr = vectorized::new_merge_iterator(std::move(seg_iterators),
-1, is_unique,
- is_reverse,
merged_row_stat);
- DCHECK(merge_itr);
- auto s = merge_itr->init(read_options);
- if (!s.ok()) {
- LOG(WARNING) << "failed to init iterator: " << s.to_string();
- return nullptr;
- }
- return merge_itr;
+ auto reader = std::unique_ptr<vectorized::VerticalBlockReader> {
+ new vectorized::VerticalBlockReader(&row_sources_buf)};
+
+ TabletReader::ReaderParams reader_params;
+ reader_params.is_segcompaction = true;
+ reader_params.segment_iters_ptr = &seg_iterators;
+ // no reader_params.version shouldn't break segcompaction
+ reader_params.tablet_schema = _context.tablet_schema;
+ reader_params.tablet = tablet;
+ reader_params.return_columns = return_columns;
+ reader_params.is_key_column_group = is_key;
+ reader->init(reader_params);
Review Comment:
need check status?
--
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]