HappenLee commented on code in PR #65482:
URL: https://github.com/apache/doris/pull/65482#discussion_r3581415363
##########
be/src/exec/operator/olap_scan_operator.cpp:
##########
@@ -698,14 +698,24 @@ Status
OlapScanLocalState::_init_scanners(std::list<ScannerSPtr>* scanners) {
bool read_row_binlog =
p._olap_scan_node.__isset.read_row_binlog &&
p._olap_scan_node.read_row_binlog;
bool has_tso_predicate = _scan_ranges[0]->__isset.start_tso ||
_scan_ranges[0]->__isset.end_tso;
+ // Query cache incremental merge: the read sources only cover the delta
+ // versions (cached_version, current_version], see prepare().
+ const bool cache_incremental =
+ _query_cache_decision != nullptr &&
+ _query_cache_decision->mode ==
QueryCacheInstanceDecision::Mode::INCREMENTAL;
+ const int64_t cache_start_version =
Review Comment:
This piece of code is useless. Later, the line auto delta_source =
_query_cache_decision->take_delta_read_source(_tablets[i].tablet->tablet_id())
already ensures that the read version is correct. Instead, this code introduces
unnecessary complexity and should be removed.
##########
be/src/exec/operator/olap_scan_operator.cpp:
##########
@@ -698,14 +698,24 @@ Status
OlapScanLocalState::_init_scanners(std::list<ScannerSPtr>* scanners) {
bool read_row_binlog =
p._olap_scan_node.__isset.read_row_binlog &&
p._olap_scan_node.read_row_binlog;
bool has_tso_predicate = _scan_ranges[0]->__isset.start_tso ||
_scan_ranges[0]->__isset.end_tso;
+ // Query cache incremental merge: the read sources only cover the delta
+ // versions (cached_version, current_version], see prepare().
+ const bool cache_incremental =
+ _query_cache_decision != nullptr &&
+ _query_cache_decision->mode ==
QueryCacheInstanceDecision::Mode::INCREMENTAL;
+ const int64_t cache_start_version =
Review Comment:
This piece of code is useless. Later, the line `auto delta_source =
_query_cache_decision->take_delta_read_source(_tablets[i].tablet->tablet_id())`
already ensures that the read version is correct. Instead, this code
introduces unnecessary complexity and should be removed.
--
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]