airborne12 commented on code in PR #51771:
URL: https://github.com/apache/doris/pull/51771#discussion_r2151146008
##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -805,9 +805,10 @@ Status ColumnReader::new_struct_iterator(ColumnIterator**
iterator,
// create default_iterator for schema-change behavior which increase column
for (size_t i = child_size; i < tablet_column_size; i++) {
TabletColumn column = tablet_column->get_sub_column(i);
- std::unique_ptr<ColumnIterator>* it = new
std::unique_ptr<ColumnIterator>();
- RETURN_IF_ERROR(Segment::new_default_iterator(column, it));
- sub_column_iterators.push_back(it->get());
+ std::unique_ptr<ColumnIterator> it;
+ RETURN_IF_ERROR(Segment::new_default_iterator(column, &it));
+ sub_column_iterators.push_back(it.get());
+ it.release();
Review Comment:
Why not directly release in pushback?
sub_column_iterators.push_back(it.release());
--
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]