eldenmoon commented on code in PR #26749:
URL: https://github.com/apache/doris/pull/26749#discussion_r1393618764
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1632,19 +1685,35 @@ void SegmentIterator::_init_current_block(
for (size_t i = 0; i < _schema->num_column_ids(); i++) {
auto cid = _schema->column_id(i);
auto column_desc = _schema->column(cid);
- // the column in block must clear() here to insert new data
- if (_is_pred_column[cid] ||
- i >= block->columns()) { //todo(wb) maybe we can release it after
output block
- current_columns[cid]->clear();
- } else { // non-predicate column
- current_columns[cid] =
std::move(*block->get_by_position(i).column).mutate();
-
- if (column_desc->type() == FieldType::OLAP_FIELD_TYPE_DATE) {
- current_columns[cid]->set_date_type();
- } else if (column_desc->type() ==
FieldType::OLAP_FIELD_TYPE_DATETIME) {
- current_columns[cid]->set_datetime_type();
- }
+ if (!_is_pred_column[cid] &&
+ !_segment->same_with_storage_type(
Review Comment:
Now it's safe, since only variant's sub columns will go through this branch
here, .It could be a common usage for later `light schema change data type`
--
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]