You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Gabriel39 (via GitHub)" <gi...@apache.org> on 2023/03/22 06:02:58 UTC

[GitHub] [doris] Gabriel39 commented on a diff in pull request #17999: [Opt](Pipeline) opt pipeline code in mult tablet

Gabriel39 commented on code in PR #17999:
URL: https://github.com/apache/doris/pull/17999#discussion_r1144270775


##########
be/src/vec/exec/scan/new_olap_scan_node.cpp:
##########
@@ -398,11 +397,10 @@ Status NewOlapScanNode::_init_scanners(std::list<VScanner*>* scanners) {
     }
 
     // ranges constructed from scan keys
-    std::vector<std::unique_ptr<doris::OlapScanRange>> cond_ranges;
-    RETURN_IF_ERROR(_scan_keys.get_key_range(&cond_ranges));
+    RETURN_IF_ERROR(_scan_keys.get_key_range(&_cond_ranges));

Review Comment:
   Why make `_cond_ranges` become a member variable?



##########
be/src/vec/exec/scan/new_olap_scanner.cpp:
##########
@@ -24,12 +24,21 @@
 namespace doris::vectorized {
 
 NewOlapScanner::NewOlapScanner(RuntimeState* state, NewOlapScanNode* parent, int64_t limit,
-                               bool aggregation, bool need_agg_finalize, RuntimeProfile* profile)
+                               bool aggregation, const TPaloScanRange& scan_range,
+                               const std::vector<OlapScanRange*>& key_ranges,
+                               const std::vector<RowsetReaderSharedPtr>& rs_readers,
+                               const std::vector<std::pair<int, int>>& rs_reader_seg_offsets,
+                               bool need_agg_finalize, RuntimeProfile* profile)
         : VScanner(state, static_cast<VScanNode*>(parent), limit, profile),
           _aggregation(aggregation),
           _need_agg_finalize(need_agg_finalize),
-          _version(-1) {
+          _version(-1),
+          _scan_range(scan_range),
+          _key_ranges(key_ranges) {

Review Comment:
   _is_init(false) is more effiecient than _is_init = false



##########
be/src/vec/exec/scan/vscanner.h:
##########
@@ -179,6 +183,8 @@ class VScanner {
     // set to true after decrease the "_num_unfinished_scanners" in scanner context
     bool _is_counted_down = false;
 
+    bool _is_init = true;

Review Comment:
   just declare this variable because we initialize it in constructor



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org