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


##########
be/src/exec/rowid_fetcher.cpp:
##########
@@ -698,16 +706,40 @@ Status RowIdStorageReader::read_batch_external_row(const 
PRequestBlockDesc& requ
          * To ensure the same behavior as the scan stage, I get query_options 
query_globals from id_file_map, then create runtime_state
          * and pass it to vfile_scanner so that the runtime_state information 
is the same as the scan stage and the behavior is also consistent.
          */
-        runtime_state = RuntimeState::create_unique(query_id, -1, 
query_options, query_globals,
-                                                    ExecEnv::GetInstance());
-
-        vfile_scanner_ptr = vectorized::FileScanner::create_unique(
-                runtime_state.get(), runtime_profile.get(), &rpc_scan_params, 
&colname_to_slot_id,
-                &tuple_desc);
+        runtime_state = RuntimeState::create_shared(
+                query_id, -1, query_options, query_globals, 
ExecEnv::GetInstance(),
+                ExecEnv::GetInstance()->rowid_storage_reader_tracker());
 
-        
RETURN_IF_ERROR(vfile_scanner_ptr->prepare_for_read_one_line(first_scan_range_desc));
+        max_file_scanners = id_file_map->get_max_file_scanners();
     }
 
+    using namespace std;
+    // Hash(TFileRangeDesc) => { all the rows that need to be read and their 
positions in the result block. }
+    map<std::string, map<segment_v2::rowid_t, size_t>> scan_rows;
+
+    // Block corresponding to the order of `scan_rows` map.
+    vector<vectorized::Block> scan_blocks;
+
+    // row_id (Indexing of vectors) => < In which block, which line in the 
block >
+    vector<pair<size_t, size_t>> row_id_block_idx;
+
+    // Count the time/bytes it takes to read each TFileRangeDesc. (for profile)

Review Comment:
   all this should be a struct an only one vector



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