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


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -586,6 +470,39 @@ Status SegmentIterator::_init_impl(const 
StorageReadOptions& opts) {
     return Status::OK();
 }
 
+Status SegmentIterator::_init_project_schema() {
+    _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;
+    }
+
+    _project_schema = _opts.project_columns != nullptr
+                              ? 
std::make_shared<Schema>(_opts.tablet_schema->columns(),
+                                                         
*_opts.project_columns)
+                              : _schema;
+    return Status::OK();
+}
+
+Status SegmentIterator::_build_project_block(Block* block, Block* 
project_block) {
+    project_block->clear();

Review Comment:
   这个现在普通的dup key表,MOW表也会走到这里,这里应该加一个快速路径的判断,就是如果发现这个project 
schema和普通schema一样的话,就直接返回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