Gabriel39 commented on code in PR #61518:
URL: https://github.com/apache/doris/pull/61518#discussion_r3332654629
##########
be/src/exec/scan/file_scanner.cpp:
##########
@@ -2017,6 +2020,47 @@ void FileScanner::try_stop() {
}
}
+void FileScanner::_update_io_context_from_range() {
+ if (!_io_ctx) {
+ return;
+ }
+ if (_local_state) {
+ auto& local_state = _local_state->cast<FileScanLocalState>();
+ _io_ctx->table_name = local_state.table_name();
Review Comment:
`table_name` is fixed and should not be modified.
##########
be/src/exec/scan/file_scanner.cpp:
##########
@@ -1034,6 +1034,7 @@ Status FileScanner::_get_next_reader() {
const TFileRangeDesc& range = _current_range;
_current_range_path = range.path;
+ _update_io_context_from_range();
Review Comment:
`_update_io_context_from_range` should be called only if a new
`TFileRangeDesc` is fetched which is happened in `_split_source->get_next`.
##########
be/src/exec/scan/olap_scanner.cpp:
##########
@@ -741,7 +749,7 @@ void OlapScanner::_collect_profile_before_close() {
// Update counters for OlapScanner
// Update counters from tablet reader's stats
auto& stats = _tablet_reader->stats();
- auto* local_state = (OlapScanLocalState*)_local_state;
+ auto* local_state = static_cast<OlapScanLocalState*>(_local_state);
Review Comment:
ditto
##########
be/src/exec/scan/olap_scanner.cpp:
##########
@@ -436,7 +447,7 @@ Status OlapScanner::_init_tablet_reader_params(
DBUG_EXECUTE_IF("NewOlapScanner::_init_tablet_reader_params.block",
DBUG_BLOCK);
if (!_state->skip_storage_engine_merge()) {
- auto* olap_scan_local_state = (OlapScanLocalState*)_local_state;
+ auto* olap_scan_local_state =
static_cast<OlapScanLocalState*>(_local_state);
Review Comment:
_local_state->cast<OlapScanLocalState>()
--
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]