yiguolei commented on code in PR #64010:
URL: https://github.com/apache/doris/pull/64010#discussion_r3386449991


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -586,6 +470,48 @@ Status SegmentIterator::_init_impl(const 
StorageReadOptions& opts) {
     return Status::OK();
 }
 
+void SegmentIterator::_init_schema_block_id_map() {
+    _schema_block_id_map.assign(_schema->columns().size(), -1);
+    for (int i = 0; i < _schema->num_column_ids(); i++) {
+        auto cid = _schema->column_id(i);
+        _schema_block_id_map[cid] = i;
+    }
+}
+
+void SegmentIterator::_init_project_schema() {
+    _init_schema_block_id_map();
+    if (_opts.project_columns == nullptr || *_opts.project_columns == 
_schema->column_ids()) {
+        _project_schema = _schema;
+    } else {
+        _project_schema =
+                std::make_shared<Schema>(_opts.tablet_schema->columns(), 
*_opts.project_columns);
+    }
+}
+
+Block* SegmentIterator::_build_project_block(Block* block, Block* 
project_block) {

Review Comment:
   return status? 因为project_block 已经是指针了,而且在这个过程中,我们也没有构建新的block



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